Chrome incorrectly accepts invalid values for -webkit-background-clip (content, padding, & border); should require "-box" suffix |
|||||||
Issue descriptionVersion: 51.0.2704.7 dev (64-bit) OS: Ubuntu 16.04 What steps will reproduce the problem? (1) Visit https://jsfiddle.net/d557kky5/ What is the expected output? No red should be visible. (The inner element's background should not be clipped.) What do you see instead? Red is visible. (The inner element's background *is* clipped.) NOTES: This bug indicates that Chrome is incorrectly accepting "-webkit-background-clip:content" as valid CSS. It should not -- "content" is not a valid value for the "background-clip" property. The correct value is "content-box" (note the "-box" suffix). The same thing happens for "border"/"border-box" & "padding"/"padding-box". (Chrome accepts the former values -- missing the "-box" suffix -- in the -webkit-background-clip alias, but it should not.) More details on this property here: https://drafts.csswg.org/css-backgrounds-3/#the-background-clip Value: <box> [ , <box> ]* <box> = border-box | padding-box | content-box I ran into this because Mozilla is implementing support for "-webkit-background-clip" as an alias in Firefox Nightly (and Edge has done the same), and I ran across an ancient WebKit blogpost which did not work in Firefox Nightly or in Edge 13, but which does work in Chrome & Safari. Turns out it's because it relies on one of these old keyword values ("border"). If there's a web-compatibility need to keep these "-box" suffixless aliases around, please let me know, and maybe we'll have to consider adding support for them. But otherwise, please get rid of them for the sake of interoperability. Thanks!
,
Apr 17 2016
I'm not sure about this property specifically, but since it's an old -webkit prefixed one, its behaviour is calcified as-is, pre-standardisation. chromestatus.com currently shows 15% of page loads contain -webkit-background-clip (https://www.chromestatus.com/metrics/css/timeline/popularity/178 - really high!). We don't have information about the usage of non'-box'-suffixed values, but without this data it's too risky to change behaviour. This is one we're likely stuck with. +tabatkins in case he's got more insight into this one.
,
Apr 18 2016
We should probably add a counter. The prefixed property also supports a "text" value. FWIW, I've been trying to keep track of our various legacy behaviors we have (with the intent that we can slowly make it smaller). https://docs.google.com/document/d/18PQf6HIrQPh8kKp3yNRZoeijBP4mF-7yZsmdoGT23gg/
,
Apr 18 2016
In general, it would also be interesting to have counters of 'how often does a webkit prefixed property get overridden by the non-prefixed version'.
,
Apr 18 2016
> since it's an old -webkit prefixed one, its behaviour is > calcified as-is, pre-standardisation. Prefixed properties don't necessarily *have* to be calcified. If the modern syntax evolves and not much web content depends on the legacy syntax being different, then it's completely reasonable to evolve the legacy version in tandem. (And unless there's proof that the web depends on the legacy cruft, it seems like it's better to err on the side of keeping the legacy version consistent with the unprefixed version.) So: in this bug, I'm curious if there's any proof that legacy content *does* depend on these old suffixless "box" values (content/padding/border) for -webkit-background-clip. (Let's set "text" aside -- Microsoft and Mozilla have both found that the web depends on "-webkit-background-clip: text", which is an unfortunate reality.) If it *is* the case that the web depends on these specific suffixless "box" values, it would be great to see evidence of that, and then Mozilla and Microsoft may need to implement them (as "-webkit-background-clip" values) for compatibility's sake. But otherwise, it would be great to see Blink remove them, for compatibility's sake (and for a reduced legacy-code-maintenance burden). tl;dr: +1 to "we should probably add a counter". Thanks! :)
,
Feb 13 2017
,
Nov 6 2017
The same issue applies to -webkit-background-origin
,
Nov 27 2017
,
Dec 6 2017
,
Dec 6
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Dec 12
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by dholb...@gmail.com
, Apr 15 2016