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 8f6262e
Browse filesBrowse the repository at this point in the historyBrowse files
fix(css): read an at-rule named with CSS escapes as that name
An at-keyword may be written with escapes — `@\6c ayer` is `@layer` — but
every table the minifier looks a name up in was keyed by the raw spelling,
so such a rule took no branch any of them names.
Two of those lookups are refusals rather than optimizations, which is where
this is a defect rather than a missed one: a sheet writing `@\6c ayer a;`
twice around a rule had the first statement dropped, moving where the layer
sits in the cascade, and the same held for `@\69 mport`. What kept most
sheets from reaching that was the namespace prologue scan treating any
escaped at-keyword as a possible `@namespace`, which disabled every
top-level transform for the whole stylesheet.
The fold is stated once, in `_atKeyword`, and reached through a new
`path.atKeyword()` for a node and `_namesAtRule` for printed text. Layer
gathering stays on the plain spelling deliberately: it slices the layer's
name at a fixed `NAMED_LAYER_OPENER_HEAD` an escape makes wrong, so an
escaped `@layer` is gathered by nothing — the safe answer — while the
refusals that keep two layers apart do read the name.
0 commit comments