views:

283

answers:

1

-moz and -webkit won't validate in w3c css validator, should I not use it? or just use the css3 attribute without the -moz or -webkit ?

+7  A: 

W3C Validation isn't everything. It's not the end of the world if your site doesn't validate. The W3C Validator was created in a time when only a select few cared about standards. It was a way to show the world that your site adhered to standards. In the end, your users probably don't care. They're there for the content. It's other developers that do, mostly. It's also a quick check to see if there are any glaring errors like tags that are not closed.

If you buy a wood-frame house, do you care what kind of softwood they used for the frame? You probably care more about what color paint will be used. However, good practices would use fir for load-bearing areas and something softer like spruce for normal areas. As long as it passed inspection ( won't come crashing down ) and it's of good build quality, you're probably happy. W3C validation is a little like that ( although I know the analogy is slightly flawed... )

Just bear in mind that the -webkit- and -moz- qualifiers are browser specific and more or less testing.

If it's sometimes crucial for your layout, then don't use them.

For example, I use -moz-border-radius and -webkit-border-radius a lot, but I always include the regular border-radius as well. The lack of rounded borders in IE doesn't matter to me as it doesn't usually break anything. It just isn't as pretty.

This follows the principles of graceful degradation and is good practice with CSS.

In the end, you have to do what's right for your audience. Web development is always about give and take... compromise. I know we all want to write everything perfectly... but with the fractured nature of the web, it's not really possible.

The good news is that it's MUCH MUCH MUCH better than it used to be.

Atømix
that's what I wanted to hear :D. I'm actually building a blank html template that matches the criteria from most of my clients so I can speed up the process and I thought I would validate it first to make sure I don't have to many errors. I do like to make it perfect as it is for future clients but I must agree that they actually won't care for minor things as long as it looks like they want and does what they want :)
krike
It's a good idea to validate to catch any accidental mistakes. You can always ignore the warnings about unknown properties beginning with `-`.
bobince
Agreed with bobince. That's how I use W3C validation... as a suggestion.
Atømix
+1, although if I buy a house I absolutely care about what wood it was used to build it :) Wouldn't like my house to fall down during the first storm... :D But, for the rest your answer is perfect
nico