css / csso

CSS minifier with structural optimizations
https://css.github.io/csso/csso.html
MIT License
3.75k stars 188 forks source link

Minify colours in CSS variables #443

Open asos-tomp opened 2 years ago

asos-tomp commented 2 years ago

Although this (from docs) works:

csso.minify('.test { color: #ff0000; }').css
// .test{color:red}

...the same doesn't appear to apply to css custom properties:

css.minify(':root { --test: #FF0000; }').css
// expected: :root{--test:red}
// received: :root{--test:#FF0000}