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. Yeah sure. You need to restart the VS2010 again. Simple
        since the dll will not load when you install css3. therefore after installing CSS3 , closed VS2010 & reopen it again .

  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!

    1. I know this is very old thread but I just did this. I installed the update, restart VS and I can see the CSS 3.0 in the validation drop down. But when I select it, it does nothing… the selection is ignored and it stays at 2.1. Any thoughts?

      1. Dear Joe,

        Yup, this post is really very old. I no longer have VS2010 in my computers, so I cannot verify this for you.

        However, if you are using latest Visual Studio, you can check out this new tool called Web Essentials (http://vswebessentials.com/). Web Essentials has CSS Validation features that also can help to point out common mistakes.

        You can read Microsoft reviews about this tool at https://blogs.msdn.microsoft.com/cdndevs/2014/05/22/css-validation-with-visual-studio-web-essentials/ too.

        Hope this helps! =)

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