Get latest CSS 3 support in Visual Studio 2010

Jun 3, 2012

Not everybody is able to upgrade to Visual Studio 2012 RC due to company policy or other reasons, but that doesn’t mean you can’t get some of its CSS 3 support in Visual Studio 2010 today. Whether or not you’ve got Web Standards Update installed or not, this is for you.

We’ve been able to port some of the support from Visual Studio 2012 into a format that is understood by Visual Studio 2010, but a lot of it I’ve had to port manually. Before proceeding, you should know that this is completely unsupported and at your own risk.

Here’s how to patch your installation of VS2010.

1. Download the new CSS 3 schema file

2. Locate the current CSS schema files. Mine are located at C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Packages\1033\schemas\CSS. If you customized your install directory, then it’s located somewhere else, but the path should be similar.

3. If you have a file called css30.xml (from Web Standards Update), then replace it with the new downloaded file. If you don’t have css30.xml, then replace css21.xml with the downloaded file. I recommend you backup the old file before overriding it – just in case.

4. Restart Visual Studio 2010.

Caveats

Visual Studio 2010 doesn’t support some of the new CSS 3 constructs and unit types. This new schema file will not help with that. It can’t. What you do get is all the standard and vendor specific properties with Intellisense and validation to the degree Visual Studio 2010 supports it.

Because a portion of this new schema was edited manually by me, it is possible that it contains a few bugs. Please report them in the comments if you find any, so I can get it fixed.

* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

Comments (6) -

Adam
Adam United States
6/5/2012 7:13:55 AM #

I'm getting a couple warnings that seem like valid css.  I have vs2010 without sp1.
Warning  2  Validation (CSS 2.1): 'url(./images/ariaBackgroundImage_light.jpg)' is not a valid value for the 'background' property.  
background:url(./images/csgLogo.png)  no-repeat top left;

Warning  4  Validation (CSS 2.1): '1px' is not a valid value for the 'border' property.  
border: 1px solid #C6CDD1;

Informer
Informer United States
6/20/2012 6:51:31 AM #

Border width property is marked as invalid as in:

border: 1px; // VS says that '1px' is not a valid value for border property

I guess this is a bug.

WayneB
WayneB United States
7/20/2012 3:25:33 PM #

I fixed the border validation bug by editing the file and changing the type attribute from "color" to "composite" for border, border-left, border-right, border-bottom and border-top.

Louer Appartement pas cher Barcelona
Louer Appartement pas cher Barcelona Spain
7/28/2012 10:23:54 AM #

When you explore Louer Appartement pas cher Barcelona In Barcelona, these apartments are available to the buyers to centrally located places like Barcelona city centre. This centrally located place is very close to the various landmarks like 'Plaza Sant Jaume' and the colorful market of 'la Boqueria'.

surfvakantie
surfvakantie Netherlands
8/24/2012 2:38:51 AM #

Those css3 support features in Visual Studio 2010 are great. I would like to have some basic features explained and am always searching for the right one. This schema looks very promising!

jhonnysheild
jhonnysheild United States
8/26/2012 6:54:25 AM #

thanks dude

Comments are closed

About the author

Mads Kristensen

Mads Kristensen
Program Manager at the Microsoft Web Platform team and founder of BlogEngine.NET.

More...

Month List

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer’s view in any way.