Contact emails [email protected]
Specification None However, PR: https://github.com/w3c/csswg-drafts/pull/12914 Summary The '&' pseudo-class now behaves like :where(:scope) (i.e. refers to the scoping root), rather than referring to the <scope-start> selector. Miriam Suzanne wrote a blog post explaining about this change: https://css.oddbird.net/scope/parent-selector/ Blink component Blink>CSS <https://issues.chromium.org/issues?q=customfield1222907:%22Blink%3ECSS%22> Web Feature ID Missing feature Risks Interoperability and Compatibility This is theoretically a breaking change, and while @scope isn't widely used yet, I added a use-counter for this which recently hit stable: https://chromestatus.com/metrics/feature/timeline/popularity/5629 (~0.00016%) Note: The use-counter triggers whenever '&' is seen in @scope at all. It does not mean that this change will actually cause an observable difference in the result for all of those 0.00016%. The possibly breaking cases would be: A) Here, the ‘&’ rule wins today, but will now lose against :where(:scope) due the change in specificity. @scope (.foo) { & { color: green; } /* Used to win; now loses. */ :where(:scope) { color: red; } } B) Since ‘&’ now refers to a specific element rather than a selector, selectors like the following can not match (since an element can not be its own sibling), whereas they previously could match: @scope (.foo) { & + & { color: green; } /* Cannot match anything anymore. */ } Gecko: Positive (https://github.com/web-platform-tests/wpt/pull/53831) Mozilla initiated the WPT change. (And the spec change.) WebKit: Shipped/Shipping ( https://github.com/WebKit/WebKit/commit/4d5ebef83e17f6201e006f379de304fac6d196b4 ) Web developers: No signals Other signals: WebView application risks Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications? None Debuggability No change. Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)? Yes Is this feature fully tested by web-platform-tests <https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md> ? Yes scope-invalidation.html <https://wpt.fyi/results/css/css-cascade/scope-invalidation.html?label=master&label=experimental&aligned&view=interop&q=label%3Ainterop-2025-scope%20file%3Ascope-invalidation.html> scope-name-defining-rules.html <https://wpt.fyi/results/css/css-cascade/scope-name-defining-rules.html?label=master&label=experimental&aligned&view=interop&q=label%3Ainterop-2025-scope%20file%3Ascope-invalidation.html> scope-specificity.html <https://wpt.fyi/results/css/css-cascade/scope-specificity.html?label=master&label=experimental&aligned&view=interop&q=label%3Ainterop-2025-scope%20file%3Ascope-invalidation.html> Flag name on about://flags Finch feature name CSSScopeifiedParentPseudoClass Rollout plan Will ship enabled for all users Tracking bug https://issues.chromium.org/issues/445949406 Estimated milestones M143 Link to entry on the Chrome Platform Status https://chromestatus.com/feature/5736934890668032?gate=6189707524440064 Note: This is a “Web-Facing Change” due to the API being changed in a trivial way <https://www.chromium.org/blink/launching-features/#behavior-changes:~:text=Use%20%22Web%20developer%20facing%20code%20change%22%20only%20for%20changes%20deemed%20very%20unlikely%20to%20break%20sites%2C%20and%20that%20change%20APIs%20in%20at%20most%20a%20trivial%20way.> with very low risk of breakage. This intent message was generated by Chrome Platform Status <https://chromestatus.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 [email protected]. To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAKFBnUpv5y%2BOf3ET5Mz6r1YT4WRuGT4zf-WpS7Z9zsOh3tDxeQ%40mail.gmail.com.
