CSS: vendor prefixes and validation

After publishing my first CSS template on CSS Discuss, I got several reactions that outlined the fact that the CSS code used there didn't pass validation due to the presence of vendor prefixes (such as -moz-border-radius and the like). Now I think it's time to talk about the state of the art concerning vendor prefixes and CSS validation. First of all, vendor prefixes are not valid. CSS specifications clearly state that these kind of prefixes cannot be considered as a part of any CSS specifications, thus they're not valid.

However, if you consider validation as an important part of your development process, you need to know what really validation is useful for. Validation is useful only for parsing purposes, not for getting a W3C badge claiming that your site is standard compliant. It needs more than a badge to be standard compliant. Standard compliance requires that your site must be accessible, usable and well-structured from the IA's point of view. Even if your CSS is valid, it doesn't mean that your work is outstanding or even professional.

Validation is a bureaucratic matter. It's absolutely required when you have to conform to some particular state law concerning web sites (like Section 508 in the USA), but nothing more. From a parsing and performance point of view, a vendor specific prefix doesn't affect browsers more than a normal CSS hack (but a vendor prefix is not an hack, of course). Remember that this kind of prefixes are often the only way to get accustomed to new CSS properties as they're currently supported in the newest versions of browsers.

In a nutshell: if you want to stick to CSS badges and bureaucracy, then avoid vendor prefixes. Otherwise, they're not evil.

This entry was posted in by Gabriele Romanato. Bookmark the permalink.

One thought on “CSS: vendor prefixes and validation”

Leave a Reply

Note: Only a member of this blog may post a comment.