WordPress & W3C CSS Validation

I’ve played around with WordPress here and there for a few years and am wondering about problems with CSS validation with WordPress themes. This may seems like a stupid question, but:

Is there a reason, relating to WordPress, why it appears no themes I’ve run across come up error-free in WC3 CSS Validation?

Read More

I thought of a number of reason this may be happening:

  • Those designing many themes not caring whether or not it pass validation
  • I’m getting my themes from not so great sources
  • There are quirks with WordPress that force designers to “hack” at their CSS

Just wondering.

Related posts

Leave a Reply

5 comments

  1. The simple reason is that WC3 CSS validation is not very important, you can do better things with your time that will effect your actual users. I’m not saying standards are not important , but with proper testing it is rather easy to ensure compatibility, but strict validation is not followed because many useful techniques are just not valid. For example google.com is not valid CSS ( or the vast majority of sites, small and large), do you think that it matters?

  2. The only situations that I can think of for not validating CSS are:

    • The theme developer uses browser-experimental properties, which are prepended with a vendor ID like “-moz”, “-o” or “-webkit”. Here‘s a list of such properties.

    • He’s using invalid CSS to fix some IE 6/7 bugs by fooling their CSS parser (not a good idea, because such fixes can be applied trough other ways)

    • There are typos in his CSS code

    This mark-up language is pretty straight-forward. Besides small typos, you can’t really produce invalid code unintentionally.

    Personally, I’m one of those who use experimental features whenever I can.

  3. I’m a big believer in XHTML validation. Personally, I strive to create XHTML-validated themes and have been successful thus far.

    Often, themes are valid but people enable plugins which are not.

  4. Many templates are coded in HTML5. I think you should try a template not coded in HTML5. A comment near the end of this post states

    1. The HTML5 validator is experimental
    
    2. The HTML 5 aspec is still in draft., It won't become a formal W3C spec until approx 2014 according to W3C.
    
    So you're currently using an experimental validator to check against a draft (and changeable) DOCTYPE spec.
    (Commenter = Esmi)