Re: [csswg-drafts] [css-scoping][selectors] `:root` should resolve to `:host` in shadow trees (#11000)

The CSS Working Group just discussed ``[css-scoping][selectors] `:root` should resolve to `:host` in shadow trees``, and agreed to the following:

* ``RESOLVED: Have  have `:scope` resolve to `:host`  rather than `:root` in shadow tree``

<details><summary>The full IRC log of that discussion</summary>
&lt;emilio> q+<br>
&lt;bramus> TabAtkins: lea mentioen that you the `:scope` resolves to `:root`. within shadow roots tha tis not useful, shoudl resolve to `:host`<br>
&lt;emilio> ack TabAtkins<br>
&lt;bramus> … because `:root` never matches<br>
&lt;astearns> ack TabAtkins<br>
&lt;bramus> … that way you can use same styles inside and outside shadow tree<br>
&lt;astearns> ack emilio<br>
&lt;bramus> emilio: compat concerns<br>
&lt;bramus> … there is usefulness to have `:root` and `:host` be different<br>
&lt;dbaron> I'm unsure whether we want the possibly-implied change to the way highlight pseudos work.<br>
&lt;bramus> … e.g. in the firefox fronted we use SD a lot<br>
&lt;bramus> … and the stylesheets end up being global styles too<br>
&lt;bramus> … dont want those to be overridden on very shadow root<br>
&lt;bramus> TabAtkins: would not overrid ehwen defined on `:root`<br>
&lt;bramus> … was wrong: proposal is to have `:scope` resolve to `:host` elem in shadow tree, rather than root.<br>
&lt;bramus> emilio: makes more sense<br>
&lt;miriam> +1<br>
&lt;bramus> PROPOSED RESOLUTION: Have  have `:scope` resolve to `:host`  rather than `:root` in shadow tree<br>
&lt;bramus> RESOLVED: Have  have `:scope` resolve to `:host`  rather than `:root` in shadow tree<br>
&lt;bramus> TabAtkins: (missed)<br>
&lt;dbaron> TabAtkins: there was a second issue raised about changing :root but as emilio points out that might cause problems<br>
&lt;bramus> emilio: extra q: does this affect parent selector? (&amp;)<br>
&lt;bramus> … which is defined to match `:scope`<br>
&lt;bramus> TabAtkins: yes, i suspect it will<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11000#issuecomment-2622719814 using your GitHub account


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

Received on Wednesday, 29 January 2025 20:01:40 UTC