Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting default CSS validation schema in Visual Studio 2013?

After recently installing Resharper I started getting warnings where it was finding items in style sheets that were not compatible with CSS 3. I was receiving error messages such as:

'xxxx' is not a known CSS property name
Property 'xxxxx' doesn't exist in CSS 3.0

It seems that Visual Studio is set up to use CSS 2.1 validation. I've found a questions on here saying how to turn the validation on, but nothing saying how to set the schema validation version. How can I do so?

like image 279
GrandMasterFlush Avatar asked Sep 12 '25 22:09

GrandMasterFlush


1 Answers

There doesn't seem to be a UI for changing the schema version but it can be done manually.

Navigate to:

C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Packages\schemas\html\ 

There should be a file called html_5.xsd that contains the the setting.

Look for the vs:cssschema element (which should be near the top of the file) and change it from :

vs:cssschema="CSS 2.1"

to

vs:cssschema="CSS 3.0"

After re-starting Visual Studio the CSS schema validation version should change.

like image 193
GrandMasterFlush Avatar answered Sep 14 '25 15:09

GrandMasterFlush