I have an HTML file that uses one CSS file. Inside this file at the very bottom, I use this for styles that need to be applied ONLY to the printer version of the page:
@media print{
....print styles here...
}
When I call wkhtmltopdf --print-media-type input.html output.pdf
, it renders the pdf with styles that are only in the @media print
enclosure and ignores the rest of the styles - which DO NOT have @media
type specified.
Is this normal, or what am I doing wrong here? Do I need to specify all styles for print inside @media print
?