The CSS keyword 'default' is not allowed within CSS custom identifiers, which are used for many types of user-defined names in CSS (for example, names created by @keyframes rules, counters, @container names, custom layout or paint names). This adds 'default' to the list of names that are reserved from being used in custom identifiers, which already reserve 'inherit', 'initial', 'unset', 'revert', and 'revert-layer'.
Note that some existing CSS features that accept custom identifiers check specifically for 'default' to avoid the risk of worsening the potential compatibility problem in this deprecation. This means that fixing the general code for custom identifiers will fix the remaining cases, though some cases are already fixed.
Keywords that CSS uses (or is likely to use in the future) as values accepted by any CSS property should not be allowed in custom identifiers because many custom identifiers are also values of CSS properties. If they can be custom identifiers, then developers could create content that would be broken by the addition of these keywords as property values either to all CSS properties, or to a particular CSS property that already accepts custom identifiers.
There is some compatibility risk if pages are using default as a custom identifier (for example, as the name of an @keyframes rule that is referenced in animation-name). This risk is lessened by the fact that Gecko and WebKit have already shipped this change; thus shipping this deprecation reduces interoperability risk.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
The debuggability matches the debuggability of syntax errors produced for existing invalid values, which include the reserved names 'inherit', 'initial', etc.
No milestones specified
https://github.com/w3c/csswg-drafts/issues/7431#issuecomment-1170371304 has data from a cluster telemetry run showing one site in the 10K set that could be affected.Estimated milestones
No milestones specified
Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5096490737860608This intent message was generated by Chrome Platform Status and then hand edited.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAG0MU3gf2ifuNT64OM7nHvo0jnXxkbZ4BmAh%2BYw0UUSq_iG%3D_g%40mail.gmail.com.
Most relevant to this intent is the case on http://www.elster.de where default is used (which is the only actual site that I'm aware of this change affecting): it is a use in the animation-name property. The relevant chunk of CSS is the following (with newlines added):body{animation-name:default;animation-duration:1ms;content:'default'}@media screen and (min-width:20rem),print{body{animation-name:min;content:'min'}}@media screen and (min-width:30rem),print{body{animation-name:xs;content:'xs'}}@media screen and (min-width:48rem),print{body{animation-name:small;content:'small'}}@media screen and (min-width:60rem),print{body{animation-name:content;content:'content'}}@media screen and (min-width:60rem),print{body{animation-name:medium;content:'medium'}}@media screen and (min-width:80rem),print{body{animation-name:large;content:'large'}}@media screen and (min-width:105rem),print{body{animation-name:xl;content:'xl'}}@media screen and (min-width:120rem),print{body{animation-name:max;content:'max(a, b)'}}@keyframes default{from{clip:rect(1px,auto,auto,auto)}to{clip:rect(0,auto,auto,auto)}}@keyframes min{from{clip:rect(1px,auto,auto,auto)}to{clip:rect(0,auto,auto,auto)}}@keyframes xs{from{clip:rect(1px,auto,auto,auto)}to{clip:rect(0,auto,auto,auto)}}@keyframes small{from{clip:rect(1px,auto,auto,auto)}to{clip:rect(0,auto,auto,auto)}}@keyframes content{from{clip:rect(1px,auto,auto,auto)}to{clip:rect(0,auto,auto,auto)}}@keyframes medium{from{clip:rect(1px,auto,auto,auto)}to{clip:rect(0,auto,auto,auto)}}@keyframes large{from{clip:rect(1px,auto,auto,auto)}to{clip:rect(0,auto,auto,auto)}}@keyframes xl{from{clip:rect(1px,auto,auto,auto)}to{clip:rect(0,auto,auto,auto)}}@keyframes max{from{clip:rect(1px,auto,auto,auto)}to{clip:rect(0,auto,auto,auto)}}
This is rather a lot of CSS to apply the clip property to body for the first 1ms of the page's existence. I'm not sure why it's there, but maybe it's a workaround for something. In any case, this change would cause this chunk of CSS to no longer do whatever it does (which is likely not very much) for pages whose width is less than 20rem.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/01aabf33-c19b-268a-2acb-fa1d7ffda983%40igalia.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAG0MU3gf2ifuNT64OM7nHvo0jnXxkbZ4BmAh%2BYw0UUSq_iG%3D_g%40mail.gmail.com.
In which milestone will this be removed?
As far as what the breakage might look like: it would look different for the different uses of custom idents in CSS. The possible cases are the CSS features that (a) use custom idents and (b) are shipping (no flag or a flag with "status: stable") and (c) don't already separately forbid default. That list is the following:
- CSS animation names (the @keyframes rule and the value of animation-name). In this case, the breakage would most likely be the absence of a CSS animation that was supposed to happen. It could also lead to a *different* set of CSS animations running, if one (now broken) CSS declaration of animation or animation-name was previously overriding another (still working) one.
- CSS counter names in the counter-reset, counter-increment, and counter-set properties and the counter() and counters() values of the content property. This failure would likely lead to incorrect numbering of list-items, footnotes, headings, or something else numbered via CSS.
- The CSS Paint API accepts custom idents as names of the paint functions. Failure here would lead to a custom paint use not working.
- A property defined with the @property at-rule's syntax descriptor to take a <custom-ident> value would also no longer accept default as a value where the <custom-ident> was used.
- The CSS page property accepts custom idents for named pages. This could lead to printing on an incorrectly sized or oriented page or with incorrect margins.
- The CSS @counter-style rule's symbol descriptor accepts custom idents in place of strings. Use of "default" here seems very unlikely in valid usage since it is unlikely that the string "default" is used as a list marker.
- The values of CSS transition-property accept custom-idents as a forward-compatibility mechanism, to avoid having parse errors when current and future CSS properties are mixed. This means that if a developer attempted to specify a transition on a list of CSS properties that included default, behavior could change, because that list would now be ignored (either leaving no transitions or fallback to another declaration).
- Likewise, the CSS color-scheme property accepts custom-idents as a forward-compatibility mechanism.