A media type identifies the broad output medium for conditional CSS. The commonly used types are screen and print; print rules adapt a page for physical output. section 7.2.1
Use media types to make printed pages clearer and less wasteful:
- Write print-only rules with @media print; unlike min-width queries, this form needs no parentheses. section 7.2.1
- Hide nonessential navigation and footers with display: none so printed output emphasizes the main content. section 7.2.1
- Remove background images and colors, and change text to black, to reduce ink use and improve print clarity. section 7.2.1
A basic print reset
A universal print rule can force black text and remove backgrounds: @media print { * { color: black !important; background: none !important; } }. section 7.2.1
@media print {
* {
color: black !important;
background: none !important;
}
}
Inspect a compact print rule that overrides screen-oriented colors and backgrounds. section 7.2.1
