Skip to content

Pull childless @layer rules to the top of the output stylesheet#3843

Draft
nex3 wants to merge 4 commits intomainfrom
initial-layer
Draft

Pull childless @layer rules to the top of the output stylesheet#3843
nex3 wants to merge 4 commits intomainfrom
initial-layer

Conversation

@nex3
Copy link
Contributor

@nex3 nex3 commented Apr 19, 2024

These rules are only allowed at the beginning of stylesheets. Allowing
them anywhere in Sass and moving them to the top of the output matches
the behavior of plain-CSS @import rules.

This is fast-track proposal. Although this does add an error when
multiple childless @layer rules are specified in the same
stylesheet, per sass/dart-sass#2225 that's not considered a breaking
change because it was already invalid CSS.

Closes #3842

These rules are only allowed at the beginning of stylesheets. Allowing
them anywhere in Sass and moving them to the top of the output matches
the behavior of plain-CSS `@import` rules.

Closes #3842
@nex3 nex3 requested a review from Goodwine April 19, 2024 23:05
@nex3 nex3 marked this pull request as draft April 20, 2024 00:22
@nex3 nex3 removed the request for review from Goodwine April 22, 2024 22:51
@stof
Copy link
Contributor

stof commented Sep 17, 2025

@nex3 what is the status of this fast-track proposal ?

@nex3
Copy link
Contributor Author

nex3 commented Sep 18, 2025

I realized there were some issues with the original semantics I had been considering, but ran out of time to pursue it further. It's on my list of things to circle back to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SCSS @use vs CSS @layer Problems.... plz fixed.. this issues..

2 participants