PDA

View Full Version : CSS3 Validation



saraquintino
24th Nov 2011, 06:46 pm
Hi David.

I have two problems with the validation of my css. And I chose css level 3 this time.
The first is that I have -webkit-border-radius, -moz-border-radius and border-radius and it tells me that property -moz-border-radius/-webkit-border-radius doesn't exist.
The second problem is that I have box-shadow: 0px 3px 2px 0px (for example) and it tells me "Parse Error [empty string]", then I tried without the "px" only the zero and it tells me "0 is not a box-shadow value".

So what is the problem? Does anyone have the same problem?

EDIT: Ah and if anyone wants to see the disaster, here (http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fsandbox.saraquintino.co m%2FWebpageDesign%2Fcoffeeshop%2Findex.html&profile=css3&usermedium=all&warning=1&vextwarning=&lang=en).

David
24th Nov 2011, 10:11 pm
Sara, I moved your post to a new thread because it's a different topic.

CSS validation is a bit tricky, especially with CSS3 because the vendor prefixes are not part of the specification, so they will always throw up errors. See this article (http://www.impressivewebs.com/css3-validation/) for more information.

Box-shadow requires a colour, that's the empty string. See this article (http://css-tricks.com/snippets/css/css-box-shadow/) for details of how to use this property.

saraquintino
24th Nov 2011, 10:33 pm
The problem is that I have colour in box-shadow. The css code is correct. I am sure.
I have box-shadow: 1px 0px 13px 0px #352B21; and the error in this one is "Parse Error [empty string]".

saraquintino
24th Nov 2011, 10:47 pm
I just read the article of Impressive Webs and I will ignore the errors of my css, because I know that the code is correct. So David, I'll have 7 errors in my css, I ignored them on purpose. I know they are there :)

David
24th Nov 2011, 10:55 pm
The common factor in the errors is that they all relate to box-shadow. I also checked some other sites using the same property. They too had the same error. My guess is that it's the validator not the CSS that's wrong.

Since CSS3 is still in flux, it's debatable how useful the validation service is in any case. I think you can relax and assume that your CSS is OK.