@@ -29,7 +29,8 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
2929 valueKeywords = parserConfig . valueKeywords || { } ,
3030 allowNested = parserConfig . allowNested ,
3131 lineComment = parserConfig . lineComment ,
32- supportsAtComponent = parserConfig . supportsAtComponent === true ;
32+ supportsAtComponent = parserConfig . supportsAtComponent === true ,
33+ highlightNonStandardPropertyKeywords = config . highlightNonStandardPropertyKeywords !== false ;
3334
3435 var type , override ;
3536 function ret ( style , tp ) { type = tp ; return style ; }
@@ -197,7 +198,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
197198 override = "property" ;
198199 return "maybeprop" ;
199200 } else if ( nonStandardPropertyKeywords . hasOwnProperty ( word ) ) {
200- override = "string-2" ;
201+ override = highlightNonStandardPropertyKeywords ? "string-2" : "property ";
201202 return "maybeprop" ;
202203 } else if ( allowNested ) {
203204 override = stream . match ( / ^ \s * : (?: \s | $ ) / , false ) ? "property" : "tag" ;
@@ -291,7 +292,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
291292 else if ( propertyKeywords . hasOwnProperty ( word ) )
292293 override = "property" ;
293294 else if ( nonStandardPropertyKeywords . hasOwnProperty ( word ) )
294- override = "string-2" ;
295+ override = highlightNonStandardPropertyKeywords ? "string-2" : "property ";
295296 else if ( valueKeywords . hasOwnProperty ( word ) )
296297 override = "atom" ;
297298 else if ( colorKeywords . hasOwnProperty ( word ) )
0 commit comments