Units on “0s” Transition in Firefox

While CSS Values and Units does not explicitly say that unitless zero times are not allowed, it does say that unitless zeroes are allowed for lengths and angles. I believe this implies unitless zeroes are not allowed for any other dimension or quantity, because unitless zeroes are never addressed anywhere else in the spec. Therefore, having a unitless zero for a time property is not allowed.1

So, if a zero without a unit is specified for a time property, the declaration is invalid and should be completely ignored, which is what Firefox is doing. In this case, Firefox is following the standard correctly, while all other browsers are buggy.


1 It seems that CSS had originally intended to allow unitless zero time values – along with several other different units – in aural style sheets. This may explain why the other browsers choose to allow unitless zero times. However, since aural style sheets are now obsolete, that section is no longer normative and as such, the rules there no longer apply. To add to the irony, none of the major browsers ever implemented aural style sheets anyway (well, besides Opera maybe…).

Leave a Comment