Intent to Ship: CSS @counter-style rules in shadow trees

135 views
Skip to first unread message

Xiaocheng Hu

unread,
Jul 22, 2021, 8:32:19 PM7/22/21
to blink-dev

Contact emails

xiaoc...@chromium.org

Explainer

https://drafts.csswg.org/css-scoping/#example-f1503361
https://drafts.csswg.org/css-scoping/#example-ee72cb37
(While the examples use @font-face, @counter-style works in the same way)

Specification

https://drafts.csswg.org/css-scoping/#shadow-names

Design docs


https://bit.ly/2Gm1oMC

Summary

Allows custom counter styles (@counter-style rules) to be defined with shadow trees, and properly referenced within shadow trees or across shadow boundaries.



Blink component

Blink>CSS

Search tags

csscountercounter-styleshadow

TAG review

https://github.com/w3ctag/design-reviews/issues/659

TAG review status

Pending

Risks



Interoperability and Compatibility

Low. Currently, browsers already have non-interoperable behaviors on how to handle name-defining at-rules in shadow DOM. This change should improve interoperability if other browsers agree to implement the spec.



Gecko: No signal (https://github.com/mozilla/standards-positions/issues/556)

WebKit: No signal (https://lists.webkit.org/pipermail/webkit-dev/2021-July/031926.html)

Web developers: Strongly positive (https://bugs.chromium.org/p/chromium/issues/detail?id=336876) While the crbug is only for @font-face, we are aiming at consistent handling of all the name-defining at-rules, including @counter-style.


Debuggability

N/A; it's an extension to an already shipped feature, @counter-style. Note that we don't have DevTools support for @counter-style yet, as the requirement was imposed after @counter-style was shipped.



Is this feature fully tested by web-platform-tests?

Yes

Flag name

--enable-blink-features=CSSAtRuleCounterStyleInShadowDOM

Requires code in //chrome?

No

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1225033

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5716198446596096

Links to previous Intent discussions

Intent to prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/vSPTU15iL9Y/m/jNYWijNmAgAJ


This intent message was generated by Chrome Platform Status.

Yoav Weiss

unread,
Jul 31, 2021, 4:00:43 PM7/31/21
to Xiaocheng Hu, blink-dev
Overall, aligning browsers on a single behavior for at rule inheritance seems like the right direction.
I think it makes sense to let the TAG review run its course, as well as give positions from other vendors a bit more time.

--
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/CAFqEGhbX3YhbNHMd4DBaf%3DsK5pk9H88O5zf%2BR4fv6KJsrLdxMQ%40mail.gmail.com.

Xiaocheng Hu

unread,
Aug 25, 2021, 5:14:21 PM8/25/21
to Yoav Weiss, Xiaocheng Hu, blink-dev
Here's an update that the TAG review has finished.

Is there a chance that we can meet the feature freeze deadline tomorrow and ship it with M95?

Chris Harrelson

unread,
Aug 25, 2021, 5:30:46 PM8/25/21
to Xiaocheng Hu, Yoav Weiss, blink-dev

Yoav Weiss

unread,
Aug 26, 2021, 2:58:13 AM8/26/21
to Chris Harrelson, Xiaocheng Hu, blink-dev
LGTM2

Daniel Bratell

unread,
Aug 26, 2021, 8:51:59 AM8/26/21
to Yoav Weiss, Chris Harrelson, Xiaocheng Hu, blink-dev

Xiaocheng Hu

unread,
Aug 26, 2021, 7:37:55 PM8/26/21
to Daniel Bratell, Yoav Weiss, Chris Harrelson, Xiaocheng Hu, blink-dev
 Thanks for reviewing! Enabled in M95.
Reply all
Reply to author
Forward
0 new messages