Grow your CSS skills. Land your dream job.

How important is valid CSS?

  • # October 16, 2012 at 1:42 pm

    When considering the ‘zoom:1′ idea for clearfix’s, I’ve been conditionally been including a tiny CSS file for browsers < IE9.

    If left in the main css file, it works without issue, but does not validate.

    Other than being anal, how does validation effect css and the performance of a website?

    (excuse me if this is uber-newb!)

    # October 16, 2012 at 3:00 pm

    You don’t really need to worry about it. See validation as a way of spotting errors rather than getting a “perfect score”. Properties, etc everyone uses, such as vendor prefixed properties, cause the validator to return errors. So as long as your invalid properties are justifiably invalid and not made up properties/errors/etc, you’ll be ok.

    It’s good to be finicky about these sort of things, but don’t worry too much about CSS validation.

    Validation is a very important tool when trying to debug. (For every time I validate my css I probably validate my html 25 times).

    # October 17, 2012 at 6:19 am

    I think the cleaner your CSS is, the faster it will be for the browser’s CSS parser.

    But I wouldn’t chase the perfect score if I were you. Firstly because a single line of CSS3 would make this impossible, and mostly because it has no point, contrary to valid markup.

    # October 18, 2012 at 4:01 pm

    Thanks guys :)
    Nice to see I’m thinking the same way that others are.

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

You must be logged in to reply to this topic.

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