Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make CSS 3.0 the Default in Visual Studio 2010 SP1 Web Update

I'm working on a HTML5 / CSS 3.0 / MVC 3 project in Visual Studio 2010. Every time I restart VS and then open a CSS file, it's always set to 'CSS 2.1'. Is there a way to tell VS I want to use CSS 3.0 always (or at least by default)?

BTW, I have looked under "Tools>Options>Text Editor>HTML" - no CSS options, default is HTML5. I have also looked under "Tools>Options>Text Editor>CSS" - no version option as far as I can see.

Thanks, Michael

like image 619
Michael Kennedy Avatar asked Sep 06 '11 17:09

Michael Kennedy


2 Answers

I had a similar problem after SP1.
I had to specifically install the "CSS 3 Intellisense Schema" found here -->

http://visualstudiogallery.msdn.microsoft.com/7211bcac-091b-4a32-be2d-e797be0db210

Restart VS and it started remembering what I had set last. HTH

like image 172
davehale23 Avatar answered Oct 16 '22 21:10

davehale23


The default CSS schema is defined by the selected HTML schema, but there is no UI to change the CSS schema targeted by the HTML schema. You will have to do it manually by editing the appropriate HTML schema.

To have HTML 5 target CSS 3.0, edit

"\Microsoft Visual Studio 10.0\Common7\Packages\schemas\html\html_5.xsd"

and change vs:cssschema to "CSS 3.0".

like image 8
Jeff Shepler Avatar answered Oct 16 '22 20:10

Jeff Shepler