Skip to content

Commit

Permalink
CSS color-adjust to print-color-adjust (#14738)
Browse files Browse the repository at this point in the history
* CSS color-adjust to print-color-adjust

* Add Safari support in 15.4

* Merge in versions and notes from -webkit-print-color-adjust.json

* Remove -webkit-print-color-adjust (merged into print-color-adjust)

* Apply suggestions from code review

Co-authored-by: Daniel D. Beck <daniel@ddbeck.com>

* Apply suggestions from code review

Co-authored-by: Daniel D. Beck <daniel@ddbeck.com>
  • Loading branch information
hamishwillee and ddbeck authored Mar 1, 2022
1 parent 4028a23 commit 3fd75f6
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 141 deletions.
72 changes: 0 additions & 72 deletions css/properties/-webkit-print-color-adjust.json

This file was deleted.

69 changes: 0 additions & 69 deletions css/properties/color-adjust.json

This file was deleted.

104 changes: 104 additions & 0 deletions css/properties/print-color-adjust.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"css": {
"properties": {
"print-color-adjust": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/print-color-adjust",
"spec_url": "https://drafts.csswg.org/css-color-adjust/#propdef-print-color-adjust",
"support": {
"chrome": {
"version_added": "17",
"prefix": "-webkit-",
"notes": [
"Chrome does not print backgrounds of the <a href='https://developer.mozilla.org/docs/Web/HTML/Element/body'><code>&lt;body&gt;</code></a> element. If this property is set to <code>exact</code> for the <code>&lt;body&gt;</code> element, it will apply only to its descendants.",
"Before version 26, if background images are clipped (for example, when using <code>background-image</code> sprites) and <code>-webkit-print-color-adjust</code> is set to <code>exact</code>, then backgrounds will appear distorted when printed. Solid backgrounds and background images that are not clipped (i.e., backgrounds that have narrower and shorter than the element to which they are applied) are printed correctly. See <a href='https://crbug.com/131054'>Chromium bug 131054</a>."
]
},
"chrome_android": {
"version_added": "18",
"prefix": "-webkit-",
"notes": [
"Chrome does not print backgrounds of the <a href='https://developer.mozilla.org/docs/Web/HTML/Element/body'><code>&lt;body&gt;</code></a> element. If this property is set to <code>exact</code> for the <code>&lt;body&gt;</code> element, it will apply only to its descendants.",
"Before version 26, if background images are clipped (for example, when using <code>background-image</code> sprites) and <code>-webkit-print-color-adjust</code> is set to <code>exact</code>, then backgrounds will appear distorted when printed. Solid backgrounds and background images that are not clipped (i.e., backgrounds that have narrower and shorter than the element to which they are applied) are printed correctly. See <a href='https://crbug.com/131054'>Chromium bug 131054</a>."
]
},
"edge": {
"version_added": "79",
"prefix": "-webkit-",
"notes": "Edge does not print backgrounds of the <a href='https://developer.mozilla.org/docs/Web/HTML/Element/body'><code>&lt;body&gt;</code></a> element. If this property is set to <code>exact</code> for the <code>&lt;body&gt;</code> element, it will apply only to its descendants."
},
"firefox": [
{
"version_added": "97"
},
{
"version_added": "48",
"alternative_name": "color-adjust"
}
],
"firefox_android": [
{
"version_added": "97"
},
{
"version_added": "48",
"alternative_name": "color-adjust"
}
],
"ie": {
"version_added": false
},
"opera": {
"version_added": "15",
"prefix": "-webkit-",
"notes": "Opera does not print backgrounds of the <a href='https://developer.mozilla.org/docs/Web/HTML/Element/body'><code>&lt;body&gt;</code></a> element. If this property is set to <code>exact</code> for the <code>&lt;body&gt;</code> element, it will apply only to its descendants."
},
"opera_android": {
"version_added": "15",
"prefix": "-webkit-",
"notes": "Opera does not print backgrounds of the <a href='https://developer.mozilla.org/docs/Web/HTML/Element/body'><code>&lt;body&gt;</code></a> element. If this property is set to <code>exact</code> for the <code>&lt;body&gt;</code> element, it will apply only to its descendants."
},
"safari": [
{
"version_added": "15.4"
},
{
"version_added": "6",
"prefix": "-webkit-",
"notes": "Safari does not print backgrounds of the <a href='https://developer.mozilla.org/docs/Web/HTML/Element/body'><code>&lt;body&gt;</code></a> element. If this property is set to <code>exact</code> for the <code>&lt;body&gt;</code> element, it will apply only to its descendants."
}
],
"safari_ios": [
{
"version_added": "15.4"
},
{
"version_added": "6",
"prefix": "-webkit-",
"notes": "Safari does not print backgrounds of the <a href='https://developer.mozilla.org/docs/Web/HTML/Element/body'><code>&lt;body&gt;</code></a> element. If this property is set to <code>exact</code> for the <code>&lt;body&gt;</code> element, it will apply only to its descendants."
}
],
"samsunginternet_android": {
"version_added": "1.0",
"prefix": "-webkit-",
"notes": [
"Samsung Internet does not print backgrounds of the <a href='https://developer.mozilla.org/docs/Web/HTML/Element/body'><code>&lt;body&gt;</code></a> element. If this property is set to <code>exact</code> for the <code>&lt;body&gt;</code> element, it will apply only to its descendants.",
"In version 1, if background images are clipped (for example, when using <code>background-image</code> sprites) and <code>-webkit-print-color-adjust</code> is set to <code>exact</code>, then backgrounds will appear distorted when printed. Solid backgrounds and background images that are not clipped (i.e., backgrounds that have narrower and shorter than the element to which they are applied) are printed correctly. See <a href='https://crbug.com/131054'>Chromium bug 131054</a>."
]
},
"webview_android": {
"version_added": "4.4",
"prefix": "-webkit-",
"notes": "WebView does not print backgrounds of the <a href='https://developer.mozilla.org/docs/Web/HTML/Element/body'><code>&lt;body&gt;</code></a> element. If this property is set to <code>exact</code> for the <code>&lt;body&gt;</code> element, it will apply only to its descendants."
}
},
"status": {
"experimental": false,
"standard_track": true,
"deprecated": false
}
}
}
}
}
}

0 comments on commit 3fd75f6

Please sign in to comment.