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
Make interleaved declaration semantics CSS-compatible #3846
Labels
Comments
nex3
added
enhancement
New feature or request
CSS compatibility
Support the CSS spec
labels
Apr 22, 2024
nex3
added a commit
that referenced
this issue
Apr 22, 2024
nex3
added a commit
that referenced
this issue
Apr 22, 2024
nex3
added a commit
that referenced
this issue
Apr 22, 2024
nex3
added a commit
that referenced
this issue
Apr 22, 2024
nex3
added a commit
that referenced
this issue
Apr 24, 2024
nex3
added a commit
that referenced
this issue
Apr 30, 2024
The proposal has landed. Since it does involve a deprecation, I'm going to give it a month for public comment. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
w3c/csswg-drafts#8738 changes the behavior of declarations interleaved with nested rules away from behavior that matches Sass's historic behavior (hoisting all properties to the original nested rule), and instead treats those behaviors as logically appearing after the nested rule. For example, the source:
currently compiles to:
but the CSS semantics are now equivalent to:
...which is meaningfully different. Reportedly, Chrome will be implementing the new semantics soon.
Although our approach to full compatibility with plain CSS nesting semantics is generally fairly cautious due to Sass's strong existing semantic grounding (see #3030), in this case the set of styles that will need to change is fairly narrow and a workaround is easy (wrapping the properties in
& { ... }
), so it's worth changing this behavior eagerly.The text was updated successfully, but these errors were encountered: