• # June 22, 2011 at 12:16 am

    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?

    # June 22, 2011 at 1:52 pm

    Why you would use 0s in a transition?

    # June 22, 2011 at 6:59 pm

    This reply has been reported for inappropriate content.

    @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.

    # June 28, 2011 at 3:13 pm

    @sldr Nice buttons, looks fantastic.

    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?

    # June 28, 2011 at 7:16 pm

    This reply has been reported for inappropriate content.

    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.

    # June 28, 2011 at 7:21 pm

    why declare it in the first place? 0, none, or not declared – it’s all the same…

    # June 28, 2011 at 7:48 pm

    This reply has been reported for inappropriate content.

    @wolfcry911 I have a transition for a button’s hover state but want to ‘turn it off’ for its active state. See the above link.

    # July 1, 2011 at 3:07 pm

    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 ;)

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.