Repository navigation
Commit c050ac3
committed
fix(css): record a rule flushed by an at-rule it cannot join
A top-level node that is not a rule the printer can join — `@keyframes`,
`@font-face` — is written out on its own path, and that path also writes out
the rule waiting behind it. Neither was noted, so a later rule could take its
selectors past declarations that were never recorded: with `.a{color:red}
.b{color:blue} @Keyframes k{…} .c{color:red}`, `.c` joined `.a` and an element
matching `.b` and `.c` read blue where it had read red. Over five framework
stylesheets that path writes out a held rule 58 times.
The note now happens inside `_emitHeld`, so every path that flushes one
records it, and a node this cannot see into is noted as declaring everything.
Reported by CodeRabbit on #21969.1 parent 8ada8da commit c050ac3
2 files changed
Lines changed: 35 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5533 | 5533 | | |
5534 | 5534 | | |
5535 | 5535 | | |
5536 | | - | |
5537 | | - | |
| 5536 | + | |
| 5537 | + | |
5538 | 5538 | | |
5539 | 5539 | | |
5540 | 5540 | | |
| |||
5544 | 5544 | | |
5545 | 5545 | | |
5546 | 5546 | | |
| 5547 | + | |
| 5548 | + | |
| 5549 | + | |
| 5550 | + | |
| 5551 | + | |
5547 | 5552 | | |
5548 | 5553 | | |
5549 | 5554 | | |
| |||
5674 | 5679 | | |
5675 | 5680 | | |
5676 | 5681 | | |
| 5682 | + | |
| 5683 | + | |
| 5684 | + | |
5677 | 5685 | | |
5678 | 5686 | | |
5679 | 5687 | | |
| |||
5690 | 5698 | | |
5691 | 5699 | | |
5692 | 5700 | | |
| 5701 | + | |
| 5702 | + | |
| 5703 | + | |
5693 | 5704 | | |
5694 | 5705 | | |
5695 | 5706 | | |
| |||
5705 | 5716 | | |
5706 | 5717 | | |
5707 | 5718 | | |
5708 | | - | |
5709 | | - | |
| 5719 | + | |
5710 | 5720 | | |
5711 | 5721 | | |
5712 | 5722 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10141 | 10141 | | |
10142 | 10142 | | |
10143 | 10143 | | |
| 10144 | + | |
| 10145 | + | |
| 10146 | + | |
| 10147 | + | |
| 10148 | + | |
| 10149 | + | |
| 10150 | + | |
| 10151 | + | |
| 10152 | + | |
| 10153 | + | |
| 10154 | + | |
| 10155 | + | |
| 10156 | + | |
| 10157 | + | |
| 10158 | + | |
| 10159 | + | |
| 10160 | + | |
| 10161 | + | |
| 10162 | + | |
| 10163 | + | |
| 10164 | + | |
10144 | 10165 | | |
10145 | 10166 | | |
10146 | 10167 | | |
| |||
0 commit comments