Custom CSS when printing
Hi, I use a custom CSS file when browsing the rendered document. When I try to print it however, it seems that it doesn't honor some part of the custom CSS file. For example, line-height is ignored. Is there any way to set a custom CSS file when printing?
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 29 Nov, 2022 03:24 PM
Is the custom CSS you're using based on an existing style? Many styles
have `@media print {}` sections that will take precedence when printing.
I would first check to make sure there aren't conflicting rules in an
@media section before troubleshooting further.
Along the same lines, you can _add_ an `@media print {}` block, and the
styles in contains will take precedence when printing. Marked does apply
some base styles to printing, but they can be overridden using
!important within @media blocks.
-Brett
2 Posted by Urchin on 29 Nov, 2022 05:02 PM
Great, "@media print" was it. Thanks so much!
Support Staff 3 Posted by Brett on 29 Nov, 2022 05:19 PM
Absolutely!