-
Notifications
You must be signed in to change notification settings - Fork 645
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
[css-nesting-1] nesting @scope
, @layer
and @media
#7965
Comments
If these do not have a specific use case for stylesheet authors I would prefer it if this was not allowed in nesting. These are typically "global" with only "order of appearance" as a factor. |
I'm not sure what you mean, they're completely polyfillable in the same way @media is today - invert the rules so @media/etc is on the top and contains the style rule. |
@layer one;
.foo {
@layer two;
}
@layer three; is equivalent to : @layer one;
@layer two;
.foo {}
@layer three; Always has layer order : Is that correct? |
Yeah, layers won't ever be dependent on selector matching (similar to how they're not dependent on CQ matching!). An Nesting |
Nice, thank you for clarifying :) |
some spec entries for this can be found here |
@argyleink These examples all follow the same basic pattern:
.foo {
@layer a-layer {
.bar {
color: red;
}
}
} But can we also do this?
.foo {
@layer a-layer {
color: red;
}
} Also unclear if the wording from section 2.2 is still correct now that |
Nesting spec needs to describe how to handle nested conditional rules, including scope and cascade layers, where it currently only articulates how to handle media queries.
The text was updated successfully, but these errors were encountered: