Skip to content
Snippets Groups Projects
Commit 752c785f authored by KwanEsq's avatar KwanEsq Committed by Marijn Haverbeke
Browse files

[css mode] teach it about CSS variables

parent a7d44a52
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,11 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
if (/[\d.]/.test(stream.peek())) {
stream.eatWhile(/[\w.%]/);
return ret("number", "unit");
} else if (stream.match(/^-[\w\\\-]+/)) {
stream.eatWhile(/[\w\\\-]/);
if (stream.match(/^\s*:/, false))
return ret("variable-2", "variable-definition");
return ret("variable-2", "variable");
} else if (stream.match(/^\w+-/)) {
return ret("meta", "meta");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment