How does the W3C CSS Validator identify a css3 document?

I have a problem!

Is there a way to identify the css3 file for the W3C validator?

In HTML5 we put <!DOCTYPE html> , but in the CSS file, what can we put?

When I check my css file and contains some css3 elements ( @font-face , box-shadow , etc.), it says that it is invalid! because he does not know this css3. So ... is there a way?

Thank you very much. David.

+4
source share
3 answers

No, CSS files do not have a self-identification feature. To test a file for a specific version of CSS, you must explicitly choose which version you want. In W3C Validator, this can be selected from the Profile menu in the Advanced Options section.

CSS 3 is what it stands for; until all CSS3 modules are complete (don't hold your breath!) it's debatable what that means ...

+5
source

James's code broke because he didn't wrap it in code tags, but here is the actual code

 http://jigsaw.w3.org/css-validator/validator?profile=css3&usermedium=all&warning=1&vextwarning=&lang=en&uri=http%3A%2F%2Fwww.yourwebsitename.com%2F 

However, this will violate your W3C validation check.

 cannot generate system identifier for general entity "usermedium" …/css-validator/validator?profile=css3&usermedium=all&warning=1&vextwarning=&la… general entity "usermedium" not defined and no default entity …/css-validator/validator?profile=css3&usermedium=all&warning=1&vextwarning=&la… reference not terminated by REFC delimiter …ator/validator?profile=css3&usermedium=all&warning=1&vextwarning=&lang=en&uri=… reference to external entity in attribute value …ator/validator?profile=css3&usermedium=all&warning=1&vextwarning=&lang=en&uri=… reference to entity "usermedium" for which no system identifier could be generated …ator/validator?profile=css3&usermedium=all&warning=1&vextwarning=&lang=en&uri=… cannot generate system identifier for general entity "warning" …validator?profile=css3&usermedium=all&warning=1&vextwarning=&lang=en&uri=http%… 

It seems strange to me that the code generated by the W3C CSS validation service disrupts the W3C Markup service. Lol

So take your poison. I adhere to the W3C Markup Validation. :)

+1
source

All Articles