demo · v136
print-color-adjust
The vendor-prefixed -webkit-print-color-adjust is now standard print-color-adjust. Pick a mode and use Ctrl/Cmd + P on the receipt below — you’ll see the difference in the print preview.
Probing
print-color-adjust support…A receipt with a saturated green background. With economy the browser strips the background to save ink. With exact the colour stays.
RECEIPT #04211
Joan Serif Display$8.00
Lora 4-pack$12.00
JetBrains Mono$0.00
Total$20.00
If this prints green, exact mode is honoured.
the code
/* Both kept working in 136 for back-compat, but use the unprefixed form: */
.receipt {
background: green;
color: white;
print-color-adjust: exact; /* keep colours when printing */
-webkit-print-color-adjust: exact; /* legacy alias */
}
see also
- Unprefixed print-color-adjust — feature index
- ChromeStatus entry
- CSS Color Adjust spec