I have a width set with a calc, and it should be returning 0 but when I look at the computed width it says 22.2333px.
:root {
--show: 1;
}
.test {
display: inline-block;
overflow: hidden;
width: calc(var(--show) - 1);
opacity: calc(var(--show) - 1);
}
<span class="test">test</span>
<span class="test2">
test2
</span>
it seems to me that the width of .test should be 0, especially as opacity is 0. If I make the value of the width property explicitly 0 it works.