Repository navigation
Commit dfc4bc4
feat(css): join rules a third stands between, behind an option
`mergeDistantRules` gives a rule the selectors of a later one printing the
same block, past the rules standing between them — sound only where nothing
between declares a property that block does, since such a rule won before the
merge and would lose after it.
Which properties those are is read from a table the generator derives from
`mdn-data`, not from the property name: not every shorthand prefixes its
longhands, so `inset` sets `top` and `font` sets `line-height` under no
prefix at all.
Off by default. Over the framework stylesheets it cuts 2457 raw bytes and
costs 27 gzip ones.
Co-authored-by: aryanraj45 <[email protected]>1 parent f01f902 commit dfc4bc4
16 files changed
Lines changed: 1159 additions & 12 deletions
File tree
- .changeset
- declarations
- lib/css
- schemas
- test
- configCases/css/minimize-merge-distant-rules
- __snapshots__
- tooling
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2459 | 2459 | | |
2460 | 2460 | | |
2461 | 2461 | | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
2462 | 2467 | | |
2463 | 2468 | | |
2464 | 2469 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| 109 | + | |
108 | 110 | | |
109 | 111 | | |
110 | 112 | | |
| |||
0 commit comments