Re: [csswg-drafts] When using @import scope(), are the imported styles 'nested'? (#11756)

It would be helpful to list out the alternatives explicitly, as I for one, am not 100% sure I understand it correctly. 

My understanding is that if the imported styles are not nested, it would require an explicit `:scope` or `&` to have them actually scoped to the selector specified in `scope()`. If that's correct, I think it is very surprising, and defeats the entire purpose of `@import url(...) scope(...);`. Literally all use cases I have come across (and there are _many_) the use case was that I wanted to import a stylesheet not written for `@scope` and have it interpreted as scoped to the specified selector. 

That said, there is utility in being able to "escape" the scope and specify root values as well. What if `:root` can still match the document root? Has the ship sailed for that?

-- 
GitHub Notification of comment by LeaVerou
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11756#issuecomment-2685693052 using your GitHub account


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

Received on Wednesday, 26 February 2025 17:12:24 UTC