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 caf4d77
Browse filesBrowse the repository at this point in the historyBrowse files
fix(css): read an escaped property name as the name it spells
§4.3.7 lets any letter of a property name be written as an escape, so
`\66 ont-weight` is `font-weight`. Every per-property rule read the name as
the source spelled it, so an escaped one matched nothing.
The worst of it is not a missed optimization: a custom property was not
recognized as one, so its value was rewritten. `\2d -x:0px 0px 0px 0px`
minified to `0 0 0 0`, and `var()` substitutes that value somewhere else —
the spec keeps it as authored for exactly that reason.
The rest are optimizations that silently did not apply: `\66 ont-weight:bold`
kept `bold` where `font-weight:bold` folds to `700`, and a box shorthand
written with an escape collapsed to `0 0 0 0` rather than `0`.
The lookups now read the unescaped name and the printed name keeps the
source's spelling. It costs an `indexOf` where nothing is escaped, which is
every declaration in practice.
Found by the CSS respelling sweep, which asks whether how a value was
spelled decides what it minifies to.
0 commit comments