{ "name": "Less", "scopeName": "source.css.less", "fileTypes": [ "less", "less.erb" ], "patterns": [ { "include": "#strings" }, { "captures": { "1": { "name": "entity.other.attribute-name.class.mixin.css" } }, "match": "(\\.[_a-zA-Z][a-zA-Z0-9_-]*(?=\\())" }, { "captures": { "1": { "name": "entity.other.attribute-name.class.css" }, "2": { "name": "punctuation.definition.entity.css" }, "4": { "name": "variable.other.interpolation.less" } }, "match": "((\\.)([_a-zA-Z]|(@{[a-zA-Z0-9_-]+}))[a-zA-Z0-9_-]*)" }, { "captures": { "0": { "name": "entity.other.attribute-name.parent-selector.css" }, "1": { "name": "punctuation.definition.entity.css" } }, "match": "(&)[a-zA-Z0-9_-]*" }, { "begin": "(format|local|url|attr|counter|counters)\\s*(\\()", "beginCaptures": { "1": { "name": "support.function.misc.css" }, "2": { "name": "punctuation.section.function.css" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.function.css" } }, "patterns": [ { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.css" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.css" } }, "name": "string.quoted.single.css", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.css" } ] }, { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.css" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.css" } }, "name": "string.quoted.double.css", "patterns": [ { "match": "\\\\(\\d{1,6}|.)", "name": "constant.character.escape.css" } ] }, { "match": "[^'\") \\t]+", "name": "variable.parameter.misc.css" } ] }, { "match": "(#)([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\\b(?!.*?(?(['\"])(?:[^\\\\]|\\\\.)*?(\\6)))))?\\s*(\\])", "name": "meta.attribute-selector.css" }, { "begin": "((@)import\\b)", "beginCaptures": { "1": { "name": "keyword.control.at-rule.import.less" }, "2": { "name": "punctuation.definition.keyword.less" } }, "end": ";", "endCaptures": { "0": { "name": "punctuation.terminator.rule.css" } }, "name": "meta.at-rule.import.css", "patterns": [ { "match": "(?<=\\(|,|\\s)\\b(reference|optional|once|multiple|less|inline)\\b(?=\\)|,)", "name": "keyword.control.import.option.less" }, { "include": "#brace_round" }, { "include": "#commas" }, { "include": "#strings" } ] }, { "captures": { "1": { "name": "keyword.control.at-rule.fontface.css" }, "2": { "name": "punctuation.definition.keyword.css" } }, "match": "^\\s*((@)font-face\\b)", "name": "meta.at-rule.fontface.css" }, { "captures": { "1": { "name": "keyword.control.at-rule.media.css" }, "2": { "name": "punctuation.definition.keyword.css" } }, "match": "^\\s*((@)media\\b)", "name": "meta.at-rule.media.css" }, { "match": "\\b(width|scan|resolution|orientation|monochrome|min-width|min-resolution|min-monochrome|min-height|min-device-width|min-device-height|min-device-aspect-ratio|min-color-index|min-color|min-aspect-ratio|max-width|max-resolution|max-monochrome|max-height|max-device-width|max-device-height|max-device-aspect-ratio|max-color-index|max-color|max-aspect-ratio|height|grid|device-width|device-height|device-aspect-ratio|color-index|color|aspect-ratio)\\b", "name": "support.type.property-name.media-feature.media.css" }, { "match": "\\b(tv|tty|screen|projection|print|handheld|embossed|braille|aural|all)\\b", "name": "support.constant.media-type.media.css" }, { "match": "\\b(portrait|landscape)\\b", "name": "support.constant.property-value.media-property.media.css" }, { "captures": { "1": { "name": "support.function.less" } }, "match": "(\\.[a-zA-Z0-9_-]+)\\s*(;|\\()" }, { "begin": "(^[ \\t]+)?(?=//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.less" } }, "end": "(?!\\G)", "patterns": [ { "begin": "//", "beginCaptures": { "0": { "name": "punctuation.definition.comment.less" } }, "end": "\\n", "name": "comment.line.double-slash.less" } ] }, { "captures": { "1": { "name": "punctuation.definition.variable.less" } }, "match": "@[a-zA-Z0-9_-][\\w-]*(?=\\s*)", "name": "variable.other.less" }, { "include": "#variable_interpolation" }, { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.section.property-list.begin.css" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.section.property-list.end.css" } }, "name": "meta.property-list.css", "patterns": [ { "include": "#pseudo_elements" }, { "include": "#pseudo_classes" }, { "include": "#variable_interpolation" }, { "include": "#property_names" }, { "include": "#property_names_svg" }, { "include": "#property_values" }, { "include": "$self" } ] }, { "match": "\\!\\s*important", "name": "keyword.other.important.css" }, { "match": "\\$|%|&|\\*|\\/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|(?\\=|\\<|\\>|not|or|and|when)\\s", "name": "keyword.control.logical.operator" }, { "match": "\\b(a|abbr|acronym|address|applet|article|area|audio|video|b|base|big|blockquote|body|br|button|caption|canvas|center|cite|code|col|colgroup|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figure|figcaption|form|frame|frameset|(h[1-6])|head|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|main|map|mark|meta|menu|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|q|ruby|s|samp|script|select|small|span|strike|strong|style|sub|sup|summary|svg|table(?!-)|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|ul|var|header|section|footer|aside|hgroup|time)\\b", "name": "keyword.control.html.elements" }, { "match": "\\b(vkern|view|use|tspan|tref|title|textPath|text|symbol|switch|svg|style|stop|set|script|rect|radialGradient|polyline|polygon|pattern|path|mpath|missing-glyph|metadata|mask|marker|linearGradient|line|image|hkern|glyphRef|glyph|g|foreignObject|font-face-uri|font-face-src|font-face-name|font-face-format|font-face|font|filter|feTurbulence|feTile|feSpotLight|feSpecularLighting|fePointLight|feOffset|feMorphology|feMergeNode|feMerge|feImage|feGaussianBlur|feFuncR|feFuncG|feFuncB|feFuncA|feFlood|feDistantLight|feDisplacementMap|feDiffuseLighting|feConvolveMatrix|feComposite|feComponentTransfer|feColorMatrix|feBlend|ellipse|desc|defs|cursor|color-profile|clipPath|circle|animateTransform|animateMotion|animateColor|animate|altGlyphItem|altGlyphDef|altGlyph|a)\\b", "name": "keyword.control.html.svg.elements" }, { "match": "(?