View Single Post
  #1 (permalink)  
Old May 7th, 2007, 15:10
spinal007's Avatar
spinal007 spinal007 is offline
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,649
Blog Entries: 1
Thanks: 0
Thanked 4 Times in 4 Posts
Why should I validate CSS?

Other than the obvious "to make sure I've got the syntax right", I don't see the point. I've just gone through lengths to make sure "non-standard" statements in my CSS files passed the W3C CSS validation. Then I came across some interesting articles on this issue.

One interesting example is the opacity rule. Although it's valid CSS3, some browsers (*cough* IE *cough*) don't support it as they should. Forcing me to do this...
Code: Select all
opacity: .9;  filter: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=90);
But why should I work around to hide the 'filter' rule when it's simply ignored by other browsers?
Why should the user be forced to download an additional stylesheet?
Why should I separate my code for different browsers when the idea of validation is that your code can be supported by most browsers?

I see the benefits of validating you HTML, but can someone explain why I should bother validating my CSS?

Last edited by spinal007; May 7th, 2007 at 15:12.
Reply With Quote