FFFF
--0
-0
First off - thank you for this tool, I've been using it for a long time on a few personal sites and it's worked really well.
I'm not 100% sure, but I think minify is breaking a CSS variable.
I have a block off css like this:
body{background:var(--5);color:var(--2);font-family:var(--4);font-size:calc(var(--0)*1.5)}
This is some CSS that has gone through postcss and is using postcss-variable-compress to reduce the size of CSS variable names.
postcss
postcss-variable-compress
This CSS is injected into the HTML of a page and after running minify on the resulting HTML, the CSS is altered to:
body{background:var(--5);color:var(--2);font-family:var(--4);font-size:calc(var(-0)*1.5)}
Note: var(--0) is changed to var(-0)
var(--0)
var(-0)
Maybe there is a rule similar to "take -0 and reduce it to 0" that is kicking in here when it shouldn't
Thanks, this should now be fixed.
CSS: fix bug with custom variables starting with a digit, fixes tdewo…
Activity
tdewolff commentedon Oct 16, 2025
Thanks, this should now be fixed.
CSS: fix bug with custom variables starting with a digit, fixes tdewo…