5

In reference to these related questions, I have had CSS3 validation set up in VS2010 for a while.

However each time I close a CSS file, the "cascading style sheet version for validation" dropdown in the css toolstrip changes back from CSS 3.0 to CSS 2.1. When reopening a css file, I need to reselect CSS 3.0 to avoid the validation errors.

Is there any way to change the default? Even a registry hack would be acceptable at this point, it really is quite annoying.

There is another benefit of changing the default for this, when editing a cshtml file. Without a CSS file open, the validation target dropdown is grayed out. So to change it to 3.0 you have to have a CSS file open. Another annoyance.

I checked Tools > Options > Text Editor > CSS, but there is no validation tab like there is for HTML.

2
  • I hate this, as well. :( Mar 8, 2012 at 16:35
  • Good news is, this doesn't seem to be an issue in the VS 11 Beta.
    – danludwig
    Mar 8, 2012 at 17:54

1 Answer 1

1

Option 2 is to go into C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Packages\1033\schemas\CSS and rename css30.xml to css21.xml (backup your files first of course).

That way, even though VS will show it is validating for version 2.1 it will really be validating for version 3.0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.