Skip to content

Instantly share code, notes, and snippets.

@negokaz
Last active June 18, 2019 11:47
Show Gist options
  • Save negokaz/dcb13d544ba7b6d9f54e3b462bdd8302 to your computer and use it in GitHub Desktop.
Save negokaz/dcb13d544ba7b6d9f54e3b462bdd8302 to your computer and use it in GitHub Desktop.
Less styles to create PDF from remark.js slides
// see https://github.com/gnab/remark/issues/50#issuecomment-223887379
@page {
// for 4:3
size: 908px 681px !important;
// for 16:9
// size: 1210px 681px !important;
margin: 0 !important;
}
@media print {
// to print only slides
body.remark-container:not(.remark-presenter-mode) {
.remark-slide-scaler {
width: 100% !important;
height: 100% !important;
transform: scale(1) !important;
top: 0 !important;
left: 0 !important;
}
}
// to print slides with the note
body.remark-container.remark-presenter-mode {
.remark-slides-area {
width: 100% !important;
}
.remark-slide-scaler {
transform: scale(0.5) translateY(-40%) !important;
border: 3px solid gray;
}
.remark-slide-notes {
margin: 0;
padding: 0 1rem;
width: 100%;
top: 55%;
font-size: 0.6rem !important;
border-top: none;
overflow-wrap: break-word;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment