Non-standard
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.
The -webkit-print-color-adjust
property is a non-standard CSS extension that can be used to force printing of background colors and images in browsers based on the WebKit engine.
Syntax
-webkit-print-color-adjust: economy | exact
Values
economy
- Normal behavior. Background colors and images are only printed if the user explicitly allows it in their browser's print settings dialog.
exact
- Background colors and images of the element to which this rule is applied are always printed, user's print settings are overridden.
Inheritance
This property is inherited.
Specifications
Not part of any specification yet, though there is a proposal in the CSSWG wiki to standardize it.
Browser compatibility
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | (Yes)[1] | Not supported | Not supported | Not supported | 6.0[2] |
Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | ? | Not supported | Not supported | Not supported | ? |
[1] Chrome does not print backgrounds of the <body>
element. If this property is set to exact
for the body element, it will apply only to its descendants.
When background images are clipped (for example, when using background-image sprites), due to Chromium bug 131054, they will appear distorted when printed from the Chrome browser with -webkit-print-color-adjust: exact
. Solid backgrounds and background images that are not clipped (i.e. have lower width and height than the element to which they are applied) are printed correctly.
[2] Safari does not print backgrounds of the <body>
element. If this property is set to exact
for the body element, it will apply only to its descendants.
See also
- WebKit bug 64583: "WIP: Add CSS property to control printing of backgrounds for individual elements"
- CSSWG wiki: print-backgrounds - a proposal to standardize this property
- CSS Color Module Level 4: the
color-adjust
property - a newer proposal to standardize this property