3 ms·
0 is 0 in all absolute units.
by zamalek 4y ago
0 is 0 in all absolute units.
- danaris 4y agoBut why should the browser have an exception for that, when subtracting zero is a no-op in the first place, and thus is pointless to even be asking it to do?
- SeanLuke 4y agoBecause it has the exception for zero everywhere else except there. It's inconsistent. IMHO the issue is that an exception for zero exists at all. Units should be required in all places.
- seba_dos1 4y agoIt doesn't. Lengths are the exception that allows unitless zero, not the other way around.
- zarzavat 4y agoBecause it’s valid in all other contexts.
- warp 4y agoBecause browsers themselves have set that expectation by accepting unitless 0 in most (all?) other places in CSS. e.g. "margin: 3px 0 4em 0" is a valid way to set the right and left margins to 0px.
- ethanbond 4y agoThis is a darn good answer! :)