开发者

How can W3C CSS Validator identify a css3 document?

I'm having a issue!

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

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

When I validate my css file and it contains some css3 elements (@font-face, box-shadow, etc), it says that it's not valid! 'cause it doesn't know it's css3. So... is t开发者_如何转开发here a method?

Thanks so much. Davide.


No, CSS files have no self-identification feature. To validate a file against a particular version of CSS, you have to explicitly choose what version you want. In the W3C Validator, this can be chosen from the “Profile” menu under “More options”.

CSS Level 3 is there, for what it's worth; until all CSS3 Modules are complete (don't hold your breath!) it's debatable what this really means...


James code broke because he didn't enclose 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 break your W3C Markup Validation.

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%…

I do find it strange that code generated by the W3C CSS validation service breaks the W3C Markup service. LOL

So pick your poison. I'm sticking with W3C Markup Validation. :)


Use the folling link with your URL in place of the question (???) marks:

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜