You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 063d146
Browse filesBrowse the repository at this point in the historyBrowse files
fix(css): join the rules a nesting hoist leaves side by side (#22268)
* fix(css): join the rules a nesting hoist leaves side by side
Lowering nesting writes a nested rule out on its own, as text, so the sibling
merge never reads it: `a{.x{top:0}.y{top:0}}` printed two rules where a
second pass writes `a .x,a .y{top:0}`. The run is joined where it is built,
concatenating like every other join, and the list is ordered once where the
run ends. The rule the hoist emptied stands in front of that run and takes
the join too where it prints the same block.
* fix(css): drop the guard the text cannot trip, and cover what the run reaches
`text` is built from this rule's own `prelude` and `rest` a few lines above,
so the check that they match could never fail — it did not fire once across
4232 parses of the comparison corpus. The run's cases are covered instead: a
parent declaring nothing, a selector the hoist wrote twice, which the list
reads back out, a deeper hoist feeding the run above it, and a parent written
as a list.
* fix(css): join the rule a hoist wrote onto the rules beside it
A hoisted rule is written out as text, and the rule it was written in records
nothing for it — so the writer read an opaque entry and offered it no join,
whatever stood either side: `a{color:red}a{.x{color:red}}` printed two rules
where a second pass writes `a,a .x{color:red}`. A run that wrote one rule
records it, which is what a join reads a prelude off. A run that wrote
several has no one prelude and stays as written.
* chore(changeset): fold the two entries into one
One changeset per pull request: both commits join what the hoist leaves
beside each other, so they read as one line in the changelog.
0 commit comments