[csswg-drafts] [css-cascade-5] browsers do not disallow CSS-wide keywords in layer names (#10067)

mayank99 has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-cascade-5] browsers do not disallow CSS-wide keywords in layer names ==
The spec clearly notes the following:

> The CSS-wide keywords are reserved for future use, and cause the rule to be invalid at parse time if used as an <ident> in the <layer-name>

I found some existing discussion in #6323, which is where the spec decision was made [originally](https://github.com/w3c/csswg-drafts/issues/6323#issuecomment-887663782).

However, it seems like browsers do not currently respect it.

This is a problem because it defeats the purpose of reserving keywords for future use.
- In #6323, there was some discussion around using the CSS-wide keywords to reference unlayered styles.
- In https://github.com/WICG/webcomponents/issues/909#issuecomment-1993388146, there's a proposal around using the CSS-wide keywords to place document styles inside shadow DOM.

Maybe this is really a WPT issue, but I think it warrants some discussion here? My main concern is that any websites outside there depending on current browser behavior could break if we start using these "reserved" keywords for new features.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 13 March 2024 07:50:58 UTC