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?
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.
Again, with the 0s transition there is none transition... Instead of use 0s you can use none, (test). Also in Firefox you can use none to eliminate the transition when pressed.
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.
Well @sl1dr There is a difference between this rules, "transition" will accept "none", and it's fine. Ah, I ignored the -moz- and -o- prefix because I was in Safari ;)
Anyone else have this issue? Any idea why it is happening?
@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.
Again, with the 0s transition there is none transition... Instead of use 0s you can use none, (test). Also in Firefox you can use none to eliminate the transition when pressed.
This work for you?