W3C home > Mailing lists > Public > public-css-archive@w3.org > November 2020

[csswg-drafts] [css-counter-styles] Clarify how @counter-style name lookup works with shadow DOM (#5693)

From: Xiaocheng Hu via GitHub <sysbot+gh@w3.org>
Date: Wed, 04 Nov 2020 01:04:18 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-735735542-1604451857-sysbot+gh@w3.org>
xiaochengh has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-counter-styles] Clarify how @counter-style name lookup works with shadow DOM ==
1. How should @counter-style rules defined in shadow DOM work. The current spec totally ignores it and says

> Defining a @counter-style makes it available to the entire document in which it is included.

The current behavior (available in Firefox only) is:
- @counter-style defined in the main document is available to the entire document
- @counter-style defined in shadow DOM is ignored ([bug](https://bugzilla.mozilla.org/show_bug.cgi?id=1672302)). This is due to #1995 

The spec should probably be revised to match the proposal in #1995 


2. How do `extends` system and `fallback` descriptor search for the correct rule with shadow DOM?

This is more complicated. If we have a @counter-style rule in a stylesheet that is reused by multiple shadow DOMs, where does it search for the rule to extend or fallback? Obviously we can't just search within the same stylesheet, while searching the entire document and ignoring scoping also seems wrong.

The proposal in #1995 doesn't work, either, because a @counter-style rule isn't associated with any tree scope when defined. And it may be reused by multiple tree scopes.

Note: The situation is similar to @property. We currently don't allow @property in shadow DOMs but it's likely to change (https://github.com/w3c/css-houdini-drafts/issues/939)

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5693 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 4 November 2020 01:04:20 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:22 UTC