I recently discovered that Firefox will ignore -moz-transition: all 0 ease; due to the fact that the 0 has no unit declared. Changing it to -moz-transition: all 0s ease; fixes the issue but then CSS Lint makes you feel like a small child for specifying a unit on a 0 value!
Anyone else have this issue? Any idea why it is happening?
@Akuseru I have the transition time set to 0 for an active state button style (see here).
@thingsinjars (Forrst) gave this explanation:
The W3C definition of the transition-duration property seems to say that the unit is not required (as you mentioned, this is the case with most CSS properties when the value is zero) but the Mozilla Developer Network reference specifically says ’0s’ or ’0ms’ and makes no reference to a unitless property.
This is probably happening because it’s an experimental property and its behaviour isn’t guaranteed to match the spec.
It works in Firefox if I change the prefix to -moz-. I don’t really like using none with experimental rules as it doesn’t always work (-webkit-animation: none; for instance) and it’s much easier to make changes if I only have to change the timing of the rule.