VS2010, HTML 5 and CSS 3 Validation

2019-05-06 23:11发布

问题:

I want to switch CSS validation in VS2010 SP1 from CSS 2.1 to CSS 3.

I came across this answer:

Is it possible to change CSS Validation scheme in VS2010

What is not clear to me is how to activate CSS 3 validation. I did find that switching HTML validation to HTML 5 causes CSS to be validated as CSS 3 (after installing CSS 3 Intellisense Schema).

However, I would have thought that the HTML level and the CSS level would be orthogonal.

Am I missing something, or does the HTML validation switch truly also control the CSS validation level?

回答1:

First, right click on the toolbar in VS2010 and enable 'Style Sheet'. Then once a CSS file is open and has focus you can change the target CSS validator from the drop down.