Grow your CSS skills. Land your dream job.

Does IE9 support color:transparent and li:nth-child(1)?

  • # January 22, 2013 at 5:46 am

    does IE9 support color:transparent and li:nth-child(1)? That’s font color transparent.

    I’m doing something ie8 pukes on but I can live with it if ie9 picks it up. Thanks

    # January 22, 2013 at 6:00 am

    **IE9 does support :nth-child() pseudo-selectors.**

    However I’m facing some difficulties finding a source regarding the transparent keyword. I know it was first introduced in CSS1 as a valid value for the background-color property.

    Then, CSS2 allowed border-color to have transparent as a valid value. Now, as far as CSS3 is concerned, transparent has become a valid value for anything accepting a color value.

    But, I don’t know where IE9 stands on the topic. I’d say it supports it on both border-color and background-color, for sure. But I don’t know it’s okay for the color property.

    Anyone wanna spread some knowledge here?

    **EDIT**: I just tested it, **it does support transparent as a value for the color property**. You’re free to go.

    # January 22, 2013 at 6:02 am

    IE9 supports rgba & hsla (AFAIK) so it should be fine although you may have to use 0 opacity rather than ‘transparent’.

    IE9 also supports nth-child (again AFAIK): http://caniuse.com/#search=nth-child

    # January 22, 2013 at 6:02 am

    I couldnt find it either. And dont have ie9 to test. Still on a stupid XP

    # January 22, 2013 at 6:03 am

    @Eric: I edited my first post to answer your question.

    @Paulie_D: not sure opacity as a better browser support than transparent. Depends on what he’s planning to do with it.

    # January 22, 2013 at 6:05 am

    @hugoGiraudel cool thank you

    # January 22, 2013 at 6:27 am

    >@Paulie_D: not sure opacity as a better browser support than transparent. Depends on what he’s planning to do with it.

    I’m referencing ‘opacity’ as the 0 in RGBA and alpha in HSLA not as a CSS property.

    Logically, if RGBA and HSLA are supported then transparent color is an option as

    color : rgba (0,0,0,0) /* transparent text */

    As you have found the KEYWORD is also supported which, I suppose was his question but it’s just shorthand for the other ways of doing it.

    # January 22, 2013 at 7:46 am

    @Paulie_D: oh okay, my bad then. I thought you were talking about the opacity property.

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

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".