Repository navigation
🐛 fix(css): keep three-colon selectors as written - #2200
Conversation
The legacy pseudo-element shortening dropped a colon from a run of three or more colons. The selector became a valid pseudo-element, so the output changed again on a second pass. Such a run now stays as written, and the shortening applies only to a pair that is not part of a longer run. Fixes tox-dev#1851
Merging this PR will improve performance by 11.02%2 warnings
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes
|
Minifying a selector with three or more colons in a row could remove one colon, and a second pass changed it again. The shortening of legacy pseudo-elements (
::nameto:name, which the legacy single-colon pseudo-elements allow) also fired on a colon that touched another colon, so:::beforelost a colon and could turn a rule that browsers ignore into one that applies. 🎯 Once this merges, such a run stays as written. Fixes #1851.The minifier shortens a legacy pseudo-element only when its
::stands alone, so selectors without a run of three or more colons are unchanged.Behavior changes