Repository navigation
Add failing tests: @import stylesheets must break concat groups - #99
Merged
mreishus merged 1 commit intoFeb 3, 2026
Merged
Conversation
Contributor
Author
mreishus
deleted the
reish20260203/show-imports-not-force-to-beginning-of-group
branch
February 3, 2026 17:03
This was referenced Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Adds tests that show a cascade ordering bug when stylesheets contain
@importrules.The problem:
The concat service hoists all
@importstatements to the top of combined output (which is required for valid CSS). But if a stylesheet with@importis concatenated after other stylesheets, its imports jump ahead of rules that should have come first, breaking cascade order.For example, if you enqueue in order
a.css->b.css(has@import) ->c.css:[a, b, c]->@importfrombappears beforea's rules[a],[b, c]->bstarts a new group, so the hoist stays in orderWhat the tests cover:
test_import_stylesheet_breaks_concat_run_before_ita(plain) ->b(@import) ->c(plain)[a],[b, c]test_import_stylesheet_only_allowed_first_in_groupa(@import) ->b(plain) ->c(@import) ->d(plain)[a, b],[c, d]Both tests fail on trunk because grouping currently ignores
@importpresence.