Skip to content

Commit 2329658

Browse files
fix(css): drop what a cut leaves dead, and join more of what prints alike (#22111)
* fix(css): drop what a cut leaves dead, and fold what it leaves adjacent A cut is made after the rules around it have already decided: the join that rewrote a rule dropped the offsets its own rules stood at, a block the cut emptied was left standing, and two blocks it left side by side never met. * fix(css): cut the condition a cut leaves empty A nested `@media`, `@supports` or `@container` was noted by nothing, so a cut that emptied it left the block standing. It is noted now to be cut and not to key a rule, which keeps an empty `@layer` — where the layer sits — untouched. * fix(css): join the rules a streamed block writes side by side A block over the streaming threshold writes each child straight out instead of assembling a body, and the join two adjacent rules printing the same block are offered lives in that assembly — so the sheets large enough to stream were the ones that lost it. The rule written last is held per depth and offered to the next, which a declaration between them parts as it does in a collected body. * fix(css): brace the single-statement branch eslint requires * fix(css): drop the streamed frame's held rule with the other frame buffers * test(css): cover the backward retry walking back over a whole run
1 parent 9dc7f1a commit 2329658

3 files changed

Lines changed: 349 additions & 49 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"webpack": patch
3+
---
4+
5+
Drop the dead CSS a cut leaves, and join more of the blocks that print alike.

0 commit comments

Comments
 (0)