Adding CSS3 to Visual Studio 2010 CSS Validation

I always edit CSS in Dreamweaver or Notepad (My friends always scream when they see me using Notepad to write CSS or HTML). Recently, I’m writing a web app to be deployed on Azure. So, I have the chance to edit CSS in Visual Studio 2010.

Visual Studio also provides us CSS validation. However, soon I found that VS kept warning me for having unknown CSS property names. I guessed that was due to the fact that it’s using an older CSS version for validation. Yappari, the “CSS Version for Validation” dropdown list showed that it’s currently using CSS 2.1. Thus, VS didn’t know the new property names introduced in CSS 3.

Warning (CSS 2.1): Unknown CSS Property Names

Warning (CSS 2.1): Unknown CSS Property Names

To solve that, I followed the steps suggested by Garry in StackOverflow. What I need to do is basically just downloading and then installing the “CSS 3 Intellisense Schema” (Free!) from VS extensions gallery: http://visualstudiogallery.msdn.microsoft.com/7211bcac-091b-4a32-be2d-e797be0db210.

Download CSS 3 Intellisense Schema for Free

Download CSS 3 Intellisense Schema for Free

In the discussion forum, there is a user, Nibblersrevenge, saying that if the CSS 3 validation entry was enabled even after the installation, we should copy the file “css30.xml” from the folder “C:\Program Files\Microsoft Visual Studio 10.0\Common7\Packages\1033\schemas\CSS” to the folder “C:\Program Files\Microsoft Visual Studio 10.0\Common7\Packages\1031\schemas\CSS”. Luckily, I didn’t encounter this problem.

After the installation is done, I can see the newly added CSS 3.0 option being added to the CSS validation dropdown. The warnings previously generated by VS are all gone after I change the CSS validation to CSS 3.0. Yay.

EDIT (27 April 2013): As iamprabhanshu pointed out in the comments section, if the CSS 3.0 option is still not available in the dropdown list after the installation, please  close the Visual Studio and re-open it.

No Warning in Validation with CSS 3.0

No Warning in Validation with CSS 3.0

Advertisements

13 thoughts on “Adding CSS3 to Visual Studio 2010 CSS Validation

  1. Works like charm. Was confused about all those registry changes. That was not at all needed. Just install it and restart the VS. CSS3 option will be added automatically. Thanks a lot guys!

  2. Pingback: [RESOLVED]validation css 2.1 box shadow is not a known css property name | ASP Questions & Answers
  3. Pingback: [RESOLVED]validation css 2.1 box shadow is not a known css property name | ASP Web Form Data Control
  4. Pingback: [RESOLVED]validation css 2.1 box shadow is not a known css property name | ASP.NET MVC

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s