Print stylesheets focus on adjusting layout and colors for paper, making printed content clear and readable. This is why they are separated.
@media print { body { font-size: 12pt; } }
The correct syntax for targeting print media is @media print { ... }. Other options are either invalid or target multiple media types.
@media print {
nav, footer {
display: none;
}
main {
width: 100%;
}
}Setting display: none hides nav and footer from print. Setting width: 100% on main makes it fill the available page width.
High contrast and readable font sizes help users with visual impairments read printed content easily. Other options reduce readability or accessibility.
In print media, pseudo-classes like :hover do not apply. The base a selector styles all links for print.
