CSS Validation and Vendor Extensions: Throw Warnings, Not Errors
Published on Jun 26, 2010 (updated Jun 10, 2021), filed under development (feed). (Share this on Mastodon or Bluesky?)
If you understand valid code as a quality baseline, you validate your code. If you validate style sheets, you come across errors like:
These should be warnings, not errors.
Two reasons.
CSS validators should check for correct syntax. The syntax in this case, and in fact most vendor-specific extensions out there, is correct.
Vendor-specific extensions are a reality. There is no advantage in ignoring this reality, or making it harder for web developers to make sure their style sheet code respects at least the syntax of CSS.
This is not a case against standardization; it is a case for opening the eyes. We don’t do web developers a favor by reporting non-standardized but syntactically correct and practically necessary properties and values as errors. This is especially true for those who got under the influence of hardcore standardistas.
A strong believer in open standards and standardization, I still avoid anything proprietary in my code. I recognize the opportunities and sometimes necessities of vendor-specific extensions though. And following, and working hard to have followed, maintainability best practices I’m less concerned about maintaining and keeping clean style sheets, than about false positives that deflect from more important things.
Not the first one to write about this, not the last one to ping www-validator-css@w3.org either.
Update (June 28, 2010)
Consider following or joining the conversation on www-validator-css@w3.org for more detail.
Update (December 31, 2010)
Fellow Googler Cyrille Moureaux and I worked to get this fixed. We have a patch ready, to actually throw warnings. We’re now figuring out how we can get the validator updated.
Update (2011)
Some time in early 2011 we got the validator patched and the issue fixed.
About Me
I’m Jens (long: Jens Oliver Meiert), and I’m a web developer, manager, and author. I’ve worked as a technical lead and engineering manager for small and large enterprises, I’m an occasional contributor to web standards (like HTML, CSS, WCAG), and I write and review books for O’Reilly and Frontend Dogma.
I love trying things, not only in web development and engineering management, but also in other areas like philosophy. Here on meiert.com I share some of my experiences and views. (I value you being critical, interpreting charitably, and giving feedback.)