Visual Studio 2008 CSS editor recognizes vendor extensions

By popular request we added support for CSS vendor extensions in VS 2008. For example, the following CSS will be marked as invalid in VS 2005

div
{
-moz-background-origin: content;
display: -moz-box;
}

but will not be squiggled in VS 2008. VS still does not provide intellisense against CSS extensions by default, but it is no longer flagging as an error properties and values that begin with '-'. You probably can still see error markers in Beta 2, but they should be gone in the final release.

See also previous articles on how to add custom CSS intellisense schema or how to modify an existing one. You can, for example, add Mozilla CSS extensions. If you add:

<cssmd:property-def _locID="-moz-background-origin" _locAttrData="description,syntax" type="color"
description="Determines how the background-position property is determined. This property is similar to the CSS3 background-origin property" syntax="content | border | padding" enum="content border padding" />

to a new or existing schema, and you'll see that VS will now be offering intellisense against the new property:

You can also add custom values to existing property. For example, add -moz-box, -moz-inline-box, etc (see https://developer.mozilla.org/en/docs/Mozilla_CSS_Extensions#display) to the list of acceptable values for display property and you'll see them in intellisense as well:

<cssmd:property-def _locID="display" _locAttrData="description,syntax" type="enum" description="The display mode of an element" syntax="One of the display values | inherit" enum="block inherit inline inline-block inline-table list-item none run-in table table-caption table-cell table-column table-column-group table-row table-row-group table-footer-group table-header-group -moz-box -moz-inline-box -moz-grid -moz-inline-grid"/>