-
Notifications
You must be signed in to change notification settings - Fork 711
[css-cascade-6] Can we support implicit scopes in nested settings? #10497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think it makes sense. But since it's a breaking change, we'd ideally have a use-counter before making a decision. |
@andruud could you start running that use-counter now, or should we get a resolution in advance? It seems like there's positive interest in this, and it would be worth taking to the group if we can. |
Yeah, I didn't manage to get a use-counter going yet, so let's get a resolution in advance. Given that the usage for Also, it appears that |
And this should presumably use the same "same set of elements as the parent" semantic that implicit nested rules get (like |
@tabatkins I don't think that makes sense.
So I think |
Hm, ok. I don't want to rely on pseudo-elements never being scoping roots, but if that's currently the case then the difference would be unobservable anyway. |
The CSS Working Group just discussed
The full IRC log of that discussion<dbaron> ScribeNick: matthieud<matthieud> miriam: previously we creating implicit @scope root without a prelude-start <matthieud> miriam: the parent node is the implied scoping root <matthieud> do we want to have the similar implicit behavior in a style rule nested context ? <ydaniv> q+ <astearns> ack ydaniv <matthieud> ydaniv: what if it's not nested ? <matthieud> miriam: we allow non nested & selector which resolve to root, could be the same <astearns> ack fantasai <matthieud> fantasai: when no scope-start, it uses the closest node at the scoping root <matthieud> fantasai: with this resolution, we will longer be able to reference this implicit scoping root <fantasai> s/longer/no longer/ <matthieud> miriam: the confusion is if you are in a style element in the doc, with an implicit @scope non nested and one nested inside a style rule, they don't have the same scoping root anymore which could be surprising <ydaniv> q+ <fantasai> Example is <matthieud> ydaniv: it's useful to have this functionality <fantasai> <section><style>@scope { ... }</style> ...</section> vs <section><style>@Style (&) { ... }</style> ...</section. <matthieud> miriam: there is no way to get back the parent node if we adopt this resolution <matthieud> ydaniv: we could have a new keyword <matthieud> fantasai: there are other situation where & and :scope don't represent the same element <fantasai> s/fantasai/miriam/ <matthieud> PROPOSED SOLUTION: close this issue, no change unless better arguments <matthieud> RESOLVED: close this issue, no change unless better arguments <fantasai> s/better arguments/arguments for stronger than those against/ |
We have previously resolved to supply an 'implicit' scope-root inside
<style>
. The root is the parent node of the<style>
element:A different implicit scope-root might be more useful when
@scope
is nested inside other selectors. In that case, I would expect the missing(<scope-start>)
should default to(&)
:That isn't exactly a parallel behavior, and I'm not sure if there are edge cases where it might be unclear which is intended. But I think this would be the most useful/expected result from a nested
@scope
syntax.The text was updated successfully, but these errors were encountered: