Closed AndyMcKenna closed 2 years ago
Can you provide the input that generated that output (vs its expected)
ta
I can't believe I forgot to include that.
body { width: 12em; height: 42ex; text-indent: 4.666ch; font-size: 3rem; border-bottom-width: 0.1vh; border-left-width: 0.1vw; border-right-width: 0.2vmin; border-top-width: 0.5vmax; --custom-property: 0px; }
so I understand your example inputs/outputs and will take a look.
Is this separate to calc(var(--whatever))
? Are there two issues?
I think it's just the one issue. calc(var(--whatever))
would be fine if it resolved to 0px
because that's what happens when we don't minimize.
Fixed in 1.19.1
Using v1.19.0
Describe the bug We've got a CSS rule of
height: calc(758px - var(--tpi-space));
and--tpi-space: 0px;
. Thepx
gets stripped off and breaks the calc. I saw #74 but the fact that we're usingvar()
hides the calc check that you have. I think as a workaround I'm going to make these values 1px but long term it would be great to whitelist properties that start with--
similar to the existing check onflex
and/or have a configuration option that disables dimension stripping altogether.To Reproduce I modified the CSS/Values expected/input files to test
Minified output or stack trace
body{width:12em;height:42ex;text-indent:4.666ch;font-size:3rem;border-bottom-width:.1vh;border-left-width:.1vw;border-right-width:.2vmin;border-top-width:.5vmax;--custom-property:0}
Excepted output code
body{width:12em;height:42ex;text-indent:4.666ch;font-size:3rem;border-bottom-width:.1vh;border-left-width:.1vw;border-right-width:.2vmin;border-top-width:.5vmax;--custom-property:0px}