CSS #unfunfact:
You can only divide by numbers in calc().
calc(5px / 1px) is invalid, not 5 as you might expect.
w3.org/TR/css-values/#calc-t…
3
21
26
So a whole class of use cases has been ruled out due to division by 0? Why not just make invalid at computed value time?
1
1
It's planned to do that in the future. Just a lot of added complication (have to track units) for first level of calc().
1
Would be nice to have a draft of that spec. If there'd been a draft, we might have implemented it a few months back...
Sep 14, 2016 · 4:52 AM UTC
1
1


