I have a ton of css validation errors because of css3 and a ton of warnings. What is the best way to deal with this? Here is the validation:
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Since you are validating your CSS against the CSS2.1 specification, you can expect to get a series of errors for any CSS3 properties you’ve included in your styles (e.g. your rounded corners). You should validate against the highest spec you’re writing against: CSS3 in your case.
If we run the validator again with CSS3, you straight away halve the number of errors you see. Again, you can discount the errors given for vendor-specific attributes such as
-moz-border-radiussince the CSS specifications do not discriminate based on the type of browser, its only concern is the standardborder-radiusdeclaration. Browser vendors have adopted their own prefixes as a hedge against an as-yet unratified standard (although border radius should really be supported by all browsers by now IMHO).Once you’ve taken out these issues your error list is actually looking pretty manageable, with only a few star hacks that the validator doesn’t like. If you can fiddle your CSS better to achieve the same results in IE without as many hacks (or perhaps include a separate IE stylesheet with a conditional comment in your WordPress template) your styles should all be looking good.
The bottom line is essentially, if you’re using CSS3 and vendor-specific prefixes, you can expect the W3C Validator to call you out on what it considers to be non-standard declarations.