matthiasmullie / minify

CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.
https://matthiasmullie.github.io/minify/
MIT License
1.96k stars 310 forks source link

Match more color codes #407

Closed live627 closed 5 months ago

live627 commented 1 year ago

The lookarounds prevented colors in backgrounds or box shadows from being matched. They also a little slow. And that huge alternation built up from the array needlessly slows everything down.

matthiasmullie commented 5 months ago

Alas, the lookarounds are required (although it sounds like they could be improved) to prevent mistaking id selectors for color codes.