Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print mode tweaks #1518

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
48 changes: 48 additions & 0 deletions _sass/layout/post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -355,3 +355,51 @@ h1 + .post-meta {
margin-right: -0.5rem;
}
}

/* --- Print Mode, remove unnecessary and annoying elements for printing --- */

@media print {
#topbar-wrapper {
display: none;
} /* hide topbar */

main {
padding: 0;
} /* remove paddings from page - they are replaced by paper margins in print */

main h1 {
margin-top: 0;
} /* remove title's top margin - it's replaced by paper margins */

.post-tail-wrapper {
margin-top: 0;
}

.embed-video {
display: none;
} /* printers can't print videos, for now */

#related-posts {
display: none;
} /* you don't need related posts on paper */

.share-wrapper {
display: none !important;
} /* for some reason the buttons printed on paper don't work */

.code-header button {
display: none;
} /* remove copy code button */

div[class^="language-"] .code-header::before{
display: none !important;
} /* remove dots from code highlight windows */

.post-navigation {
display: none !important;
}

footer {
margin-top: 0 !important;
}
}