tm-grammars
Version:
Collecton of TextMate grammars in JSON
1,826 lines (1,825 loc) • 172 kB
JSON
{
"displayName": "Less",
"name": "less",
"patterns": [
{
"include": "#comment-block"
},
{
"include": "#less-namespace-accessors"
},
{
"include": "#less-extend"
},
{
"include": "#at-rules"
},
{
"include": "#less-variable-assignment"
},
{
"include": "#property-list"
},
{
"include": "#selector"
}
],
"repository": {
"angle-type": {
"captures": {
"1": {
"name": "keyword.other.unit.less"
}
},
"match": "(?i:[-+]?(?:\\d*\\.\\d+(?:[Ee][-+]?\\d+)*|[-+]?\\d+)(deg|grad|rad|turn))\\b",
"name": "constant.numeric.less"
},
"arbitrary-repetition": {
"captures": {
"1": {
"name": "punctuation.definition.arbitrary-repetition.less"
}
},
"match": "\\s*(,)"
},
"at-charset": {
"begin": "\\s*((@)charset)\\b\\s*",
"beginCaptures": {
"1": {
"name": "keyword.control.at-rule.charset.less"
},
"2": {
"name": "punctuation.definition.keyword.less"
}
},
"end": "\\s*((?=;|$))",
"name": "meta.at-rule.charset.less",
"patterns": [
{
"include": "#literal-string"
}
]
},
"at-container": {
"begin": "(?=\\s*@container)",
"end": "\\s*(})",
"endCaptures": {
"1": {
"name": "punctuation.definition.block.end.less"
}
},
"patterns": [
{
"begin": "((@)container)",
"beginCaptures": {
"1": {
"name": "keyword.control.at-rule.container.less"
},
"2": {
"name": "punctuation.definition.keyword.less"
},
"3": {
"name": "support.constant.container.less"
}
},
"end": "(?=\\{)",
"name": "meta.at-rule.container.less",
"patterns": [
{
"begin": "\\s*(?=[^;{])",
"end": "\\s*(?=[;{])",
"patterns": [
{
"match": "\\b(not|and|or)\\b",
"name": "keyword.operator.comparison.less"
},
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.group.begin.less"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.group.end.less"
}
},
"name": "meta.at-rule.container-query.less",
"patterns": [
{
"captures": {
"1": {
"name": "support.type.property-name.less"
}
},
"match": "\\b(aspect-ratio|block-size|height|inline-size|orientation|width)\\b",
"name": "support.constant.size-feature.less"
},
{
"match": "(([<>])=?)|[/=]",
"name": "keyword.operator.comparison.less"
},
{
"match": ":",
"name": "punctuation.separator.key-value.less"
},
{
"match": "portrait|landscape",
"name": "support.constant.property-value.less"
},
{
"include": "#numeric-values"
},
{
"match": "/",
"name": "keyword.operator.arithmetic.less"
},
{
"include": "#var-function"
},
{
"include": "#less-variables"
},
{
"include": "#less-variable-interpolation"
}
]
},
{
"include": "#style-function"
},
{
"match": "--|-?(?:[A-Z_a-z·À-ÖØ-öø-ͽͿ-‿⁀⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-\\x{EFFFF}]|\\\\(?:\\N|\\H|\\h{1,6}[R\\s]))(?:[-A-Z_a-z·À-ÖØ-öø-ͽͿ-‿⁀⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-\\x{EFFFF}\\d]|\\\\(?:\\N|\\H|\\h{1,6}[R\\s]))*",
"name": "variable.parameter.container-name.css"
},
{
"include": "#arbitrary-repetition"
},
{
"include": "#less-variables"
}
]
}
]
},
{
"begin": "\\s*(\\{)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.block.begin.less"
}
},
"end": "(?=})",
"patterns": [
{
"include": "#rule-list-body"
},
{
"include": "$self"
}
]
}
]
},
"at-counter-style": {
"begin": "\\s*((@)counter-style)\\b\\s+(?:(?i:\\b(decimal|none)\\b)|(-?(?:[A-Z_a-z[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}[\\t\\n\\f\\s]?|[^\\n\\f\\h]))(?:[-\\w[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}[\\t\\n\\f\\s]?|[^\\n\\f\\h]))*))\\s*(?=\\{|$)",
"beginCaptures": {
"1": {
"name": "keyword.control.at-rule.counter-style.less"
},
"2": {
"name": "punctuation.definition.keyword.less"
},
"3": {
"name": "invalid.illegal.counter-style-name.less"
},
"4": {
"name": "entity.other.counter-style-name.css"
}
},
"end": "\\s*(})",
"endCaptures": {
"1": {
"name": "punctuation.definition.block.begin.less"
}
},
"name": "meta.at-rule.counter-style.less",
"patterns": [
{
"include": "#comment-block"
},
{
"include": "#rule-list"
}
]
},
"at-custom-media": {
"begin": "(?=\\s*@custom-media\\b)",
"end": "\\s*(?=;)",
"name": "meta.at-rule.custom-media.less",
"patterns": [
{
"captures": {
"0": {
"name": "punctuation.section.property-list.less"
}
},
"match": "\\s*;"
},
{
"captures": {
"1": {
"name": "keyword.control.at-rule.custom-media.less"
},
"2": {
"name": "punctuation.definition.keyword.less"
},
"3": {
"name": "support.constant.custom-media.less"
}
},
"match": "\\s*((@)custom-media)(?=.*?)"
},
{
"include": "#media-query-list"
}
]
},
"at-font-face": {
"begin": "\\s*((@)font-face)\\s*(?=\\{|$)",
"beginCaptures": {
"1": {
"name": "keyword.control.at-rule.font-face.less"
},
"2": {
"name": "punctuation.definition.keyword.less"
}
},
"end": "\\s*(})",
"endCaptures": {
"1": {
"name": "punctuation.definition.block.end.less"
}
},
"name": "meta.at-rule.font-face.less",
"patterns": [
{
"include": "#comment-block"
},
{
"include": "#rule-list"
}
]
},
"at-import": {
"begin": "\\s*((@)import)\\b\\s*",
"beginCaptures": {
"1": {
"name": "keyword.control.at-rule.import.less"
},
"2": {
"name": "punctuation.definition.keyword.less"
}
},
"end": ";",
"endCaptures": {
"0": {
"name": "punctuation.terminator.rule.less"
}
},
"name": "meta.at-rule.import.less",
"patterns": [
{
"include": "#url-function"
},
{
"include": "#less-variables"
},
{
"begin": "(?<=([\"'])|([\"']\\)))\\s*",
"end": "\\s*(?=;)",
"patterns": [
{
"include": "#media-query"
}
]
},
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.group.begin.less"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.group.end.less"
}
},
"name": "meta.group.less",
"patterns": [
{
"match": "reference|inline|less|css|once|multiple|optional",
"name": "constant.language.import-directive.less"
},
{
"include": "#comma-delimiter"
}
]
},
{
"include": "#literal-string"
}
]
},
"at-keyframes": {
"begin": "\\s*((@)keyframes)(?=.*?\\{)",
"beginCaptures": {
"1": {
"name": "keyword.control.at-rule.keyframe.less"
},
"2": {
"name": "punctuation.definition.keyword.less"
},
"4": {
"name": "support.constant.keyframe.less"
}
},
"end": "\\s*(})",
"endCaptures": {
"1": {
"name": "punctuation.definition.block.end.less"
}
},
"patterns": [
{
"begin": "\\s*(\\{)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.block.begin.less"
}
},
"end": "(?=})",
"patterns": [
{
"captures": {
"1": {
"name": "keyword.other.keyframe-selector.less"
},
"2": {
"name": "constant.numeric.less"
},
"3": {
"name": "keyword.other.unit.less"
}
},
"match": "\\s*(?:(from|to)|((?:\\.[0-9]+|[0-9]+(?:\\.[0-9]*)?)(%)))\\s*,?\\s*"
},
{
"include": "$self"
}
]
},
{
"begin": "\\s*(?=[^;{])",
"end": "\\s*(?=\\{)",
"name": "meta.at-rule.keyframe.less",
"patterns": [
{
"include": "#keyframe-name"
},
{
"include": "#arbitrary-repetition"
}
]
}
]
},
"at-media": {
"begin": "(?=\\s*@media\\b)",
"end": "\\s*(})",
"endCaptures": {
"1": {
"name": "punctuation.definition.block.end.less"
}
},
"patterns": [
{
"begin": "\\s*((@)media)",
"beginCaptures": {
"1": {
"name": "keyword.control.at-rule.media.less"
},
"2": {
"name": "punctuation.definition.keyword.less"
},
"3": {
"name": "support.constant.media.less"
}
},
"end": "\\s*(?=\\{)",
"name": "meta.at-rule.media.less",
"patterns": [
{
"include": "#media-query-list"
}
]
},
{
"begin": "\\s*(\\{)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.block.begin.less"
}
},
"end": "(?=})",
"patterns": [
{
"include": "#rule-list-body"
},
{
"include": "$self"
}
]
}
]
},
"at-namespace": {
"begin": "\\s*((@)namespace)\\s+",
"beginCaptures": {
"1": {
"name": "keyword.control.at-rule.namespace.less"
},
"2": {
"name": "punctuation.definition.keyword.less"
}
},
"end": ";",
"endCaptures": {
"0": {
"name": "punctuation.terminator.rule.less"
}
},
"name": "meta.at-rule.namespace.less",
"patterns": [
{
"include": "#url-function"
},
{
"include": "#literal-string"
},
{
"match": "(-?(?:[A-Z_a-z[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}[\\t\\n\\f\\s]?|[^\\n\\f\\h]))(?:[-\\w[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}[\\t\\n\\f\\s]?|[^\\n\\f\\h]))*)",
"name": "entity.name.constant.namespace-prefix.less"
}
]
},
"at-page": {
"captures": {
"1": {
"name": "keyword.control.at-rule.page.less"
},
"2": {
"name": "punctuation.definition.keyword.less"
},
"3": {
"name": "punctuation.definition.entity.less"
},
"4": {
"name": "entity.other.attribute-name.pseudo-class.less"
}
},
"match": "\\s*((@)page)\\s*(?:(:)(first|left|right))?\\s*(?=\\{|$)",
"name": "meta.at-rule.page.less",
"patterns": [
{
"include": "#comment-block"
},
{
"include": "#rule-list"
}
]
},
"at-rules": {
"patterns": [
{
"include": "#at-charset"
},
{
"include": "#at-container"
},
{
"include": "#at-counter-style"
},
{
"include": "#at-custom-media"
},
{
"include": "#at-font-face"
},
{
"include": "#at-media"
},
{
"include": "#at-import"
},
{
"include": "#at-keyframes"
},
{
"include": "#at-namespace"
},
{
"include": "#at-page"
},
{
"include": "#at-supports"
},
{
"include": "#at-viewport"
}
]
},
"at-supports": {
"begin": "(?=\\s*@supports\\b)",
"end": "(?=\\s*)(})",
"endCaptures": {
"1": {
"name": "punctuation.definition.block.end.less"
}
},
"patterns": [
{
"begin": "\\s*((@)supports)",
"beginCaptures": {
"1": {
"name": "keyword.control.at-rule.supports.less"
},
"2": {
"name": "punctuation.definition.keyword.less"
},
"3": {
"name": "support.constant.supports.less"
}
},
"end": "\\s*(?=\\{)",
"name": "meta.at-rule.supports.less",
"patterns": [
{
"include": "#at-supports-operators"
},
{
"include": "#at-supports-parens"
}
]
},
{
"begin": "\\s*(\\{)",
"beginCaptures": {
"1": {
"name": "punctuation.section.property-list.begin.less"
}
},
"end": "(?=})",
"patterns": [
{
"include": "#rule-list-body"
},
{
"include": "$self"
}
]
}
]
},
"at-supports-operators": {
"match": "\\b(?:and|or|not)\\b",
"name": "keyword.operator.logic.less"
},
"at-supports-parens": {
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.group.begin.less"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.group.end.less"
}
},
"name": "meta.group.less",
"patterns": [
{
"include": "#at-supports-operators"
},
{
"include": "#at-supports-parens"
},
{
"include": "#rule-list-body"
}
]
},
"attr-function": {
"begin": "\\b(attr)(?=\\()",
"beginCaptures": {
"1": {
"name": "support.function.filter.less"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.group.end.less"
}
},
"name": "meta.function-call.less",
"patterns": [
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.group.begin.less"
}
},
"end": "(?=\\))",
"patterns": [
{
"include": "#qualified-name"
},
{
"include": "#literal-string"
},
{
"begin": "(-?(?:[A-Z_a-z[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}[\\t\\n\\f\\s]?|[^\\n\\f\\h]))(?:[-\\w[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}[\\t\\n\\f\\s]?|[^\\n\\f\\h]))*)",
"end": "(?=\\))",
"name": "entity.other.attribute-name.less",
"patterns": [
{
"match": "\\b((?i:em|ex|ch|rem)|(?i:v(?:[hw]|min|max))|(?i:cm|mm|q|in|pt|pc|px|fr)|(?i:deg|grad|rad|turn)|(?i:(?:|m)s)|(?i:(?:|k)Hz)|(?i:dp(?:i|cm|px)))\\b",
"name": "keyword.other.unit.less"
},
{
"include": "#comma-delimiter"
},
{
"include": "#property-value-constants"
},
{
"include": "#numeric-values"
}
]
},
{
"include": "#color-values"
}
]
}
]
},
"builtin-functions": {
"patterns": [
{
"include": "#attr-function"
},
{
"include": "#calc-function"
},
{
"include": "#color-functions"
},
{
"include": "#counter-functions"
},
{
"include": "#cross-fade-function"
},
{
"include": "#cubic-bezier-function"
},
{
"include": "#filter-function"
},
{
"include": "#fit-content-function"
},
{
"include": "#format-function"
},
{
"include": "#gradient-functions"
},
{
"include": "#grid-repeat-function"
},
{
"include": "#image-function"
},
{
"include": "#less-functions"
},
{
"include": "#local-function"
},
{
"include": "#minmax-function"
},
{
"include": "#regexp-function"
},
{
"include": "#shape-functions"
},
{
"include": "#steps-function"
},
{
"include": "#symbols-function"
},
{
"include": "#transform-functions"
},
{
"include": "#url-function"
},
{
"include": "#var-function"
}
]
},
"calc-function": {
"begin": "\\b(calc)(?=\\()",
"beginCaptures": {
"1": {
"name": "support.function.calc.less"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.group.end.less"
}
},
"name": "meta.function-call.less",
"patterns": [
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.group.begin.less"
}
},
"end": "(?=\\))",
"patterns": [
{
"include": "#less-strings"
},
{
"include": "#var-function"
},
{
"include": "#calc-function"
},
{
"include": "#attr-function"
},
{
"include": "#less-math"
},
{
"include": "#relative-color"
}
]
}
]
},
"color-adjuster-operators": {
"match": "[-*+](?=\\s+)",
"name": "keyword.operator.less"
},
"color-functions": {
"patterns": [
{
"begin": "\\b(rgba?)(?=\\()",
"beginCaptures": {
"1": {
"name": "support.function.color.less"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.group.end.less"
}
},
"name": "meta.function-call.less",
"patterns": [
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.group.begin.less"
}
},
"end": "(?=\\))",
"patterns": [
{
"include": "#less-strings"
},
{
"include": "#less-variables"
},
{
"include": "#var-function"
},
{
"include": "#comma-delimiter"
},
{
"include": "#value-separator"
},
{
"include": "#percentage-type"
},
{
"include": "#number-type"
}
]
}
]
},
{
"begin": "\\b(hsla|hsl|hwb|oklab|oklch|lab|lch)(?=\\()",
"beginCaptures": {
"1": {
"name": "support.function.color.less"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.group.end.less"
}
},
"name": "meta.function-call.less",
"patterns": [
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.group.begin.less"
}
},
"end": "(?=\\))",
"patterns": [
{
"include": "#color-values"
},
{
"include": "#less-strings"
},
{
"include": "#less-variables"
},
{
"include": "#var-function"
},
{
"include": "#comma-delimiter"
},
{
"include": "#angle-type"
},
{
"include": "#percentage-type"
},
{
"include": "#number-type"
},
{
"include": "#calc-function"
},
{
"include": "#value-separator"
}
]
}
]
},
{
"begin": "\\b(light-dark)(?=\\()",
"beginCaptures": {
"1": {
"name": "support.function.color.less"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.group.end.less"
}
},
"name": "meta.function-call.less",
"patterns": [
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.group.begin.less"
}
},
"end": "(?=\\))",
"patterns": [
{
"include": "#color-values"
},
{
"include": "#comma-delimiter"
}
]
}
]
},
{
"include": "#less-color-functions"
}
]
},
"color-values": {
"patterns": [
{
"include": "#color-functions"
},
{
"include": "#less-functions"
},
{
"include": "#less-variables"
},
{
"include": "#var-function"
},
{
"match": "\\b(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)\\b",
"name": "support.constant.color.w3c-standard-color-name.less"
},
{
"match": "\\b(aliceblue|antiquewhite|aquamarine|azure|beige|bisque|blanchedalmond|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|gainsboro|ghostwhite|gold|goldenrod|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|limegreen|linen|magenta|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|oldlace|olivedrab|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|rebeccapurple|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|thistle|tomato|turquoise|violet|wheat|whitesmoke|yellowgreen)\\b",
"name": "support.constant.color.w3c-extended-color-keywords.less"
},
{
"match": "\\b((?i)currentColor|transparent)\\b",
"name": "support.constant.color.w3c-special-color-keyword.less"
},
{
"captures": {
"1": {
"name": "punctuation.definition.constant.less"
}
},
"match": "(#)(\\h{3}|\\h{4}|\\h{6}|\\h{8})\\b",
"name": "constant.other.color.rgb-value.less"
},
{
"include": "#relative-color"
}
]
},
"comma-delimiter": {
"captures": {
"1": {
"name": "punctuation.separator.less"
}
},
"match": "\\s*(,)\\s*"
},
"comment-block": {
"patterns": [
{
"begin": "/\\*",
"beginCaptures": {
"0": {
"name": "punctuation.definition.comment.less"
}
},
"end": "\\*/",
"endCaptures": {
"0": {
"name": "punctuation.definition.comment.less"
}
},
"name": "comment.block.less"
},
{
"include": "#comment-line"
}
]
},
"comment-line": {
"captures": {
"1": {
"name": "punctuation.definition.comment.less"
}
},
"match": "(//).*$\\n?",
"name": "comment.line.double-slash.less"
},
"counter-functions": {
"patterns": [
{
"begin": "\\b(counter)(?=\\()",
"beginCaptures": {
"1": {
"name": "support.function.filter.less"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.group.end.less"
}
},
"name": "meta.function-call.less",
"patterns": [
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.group.begin.less"
}
},
"end": "(?=\\))",
"patterns": [
{
"include": "#less-strings"
},
{
"include": "#less-variables"
},
{
"include": "#var-function"
},
{
"match": "--(?:[-\\w[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}[\\t\\n\\f\\s]?|[^\\n\\f\\h]))+|-?(?:[A-Z_a-z[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}[\\t\\n\\f\\s]?|[^\\n\\f\\h]))(?:[-\\w[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}[\\t\\n\\f\\s]?|[^\\n\\f\\h]))*",
"name": "entity.other.counter-name.less"
},
{
"begin": "(?=,)",
"end": "(?=\\))",
"patterns": [
{
"include": "#comma-delimiter"
},
{
"match": "\\b((?i:arabic-indic|armenian|bengali|cambodian|circle|cjk-decimal|cjk-earthly-branch|cjk-heavenly-stem|decimal-leading-zero|decimal|devanagari|disclosure-closed|disclosure-open|disc|ethiopic-numeric|georgian|gujarati|gurmukhi|hebrew|hiragana-iroha|hiragana|japanese-formal|japanese-informal|kannada|katakana-iroha|katakana|khmer|korean-hangul-formal|korean-hanja-formal|korean-hanja-informal|lao|lower-alpha|lower-armenian|lower-greek|lower-latin|lower-roman|malayalam|mongolian|myanmar|oriya|persian|simp-chinese-formal|simp-chinese-informal|square|tamil|telugu|thai|tibetan|trad-chinese-formal|trad-chinese-informal|upper-alpha|upper-armenian|upper-latin|upper-roman)|none)\\b",
"name": "support.constant.property-value.counter-style.less"
}
]
}
]
}
]
},
{
"begin": "\\b(counters)(?=\\()",
"beginCaptures": {
"1": {
"name": "support.function.filter.less"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.group.end.less"
}
},
"name": "meta.function-call.less",
"patterns": [
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.group.begin.less"
}
},
"end": "(?=\\))",
"patterns": [
{
"match": "(-?(?:[A-Z_a-z[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}[\\t\\n\\f\\s]?|[^\\n\\f\\h]))(?:[-\\w[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}[\\t\\n\\f\\s]?|[^\\n\\f\\h]))*)",
"name": "entity.other.counter-name.less string.unquoted.less"
},
{
"begin": "(?=,)",
"end": "(?=\\))",
"patterns": [
{
"include": "#less-strings"
},
{
"include": "#less-variables"
},
{
"include": "#var-function"
},
{
"include": "#literal-string"
},
{
"include": "#comma-delimiter"
},
{
"match": "\\b((?i:arabic-indic|armenian|bengali|cambodian|circle|cjk-decimal|cjk-earthly-branch|cjk-heavenly-stem|decimal-leading-zero|decimal|devanagari|disclosure-closed|disclosure-open|disc|ethiopic-numeric|georgian|gujarati|gurmukhi|hebrew|hiragana-iroha|hiragana|japanese-formal|japanese-informal|kannada|katakana-iroha|katakana|khmer|korean-hangul-formal|korean-hanja-formal|korean-hanja-informal|lao|lower-alpha|lower-armenian|lower-greek|lower-latin|lower-roman|malayalam|mongolian|myanmar|oriya|persian|simp-chinese-formal|simp-chinese-informal|square|tamil|telugu|thai|tibetan|trad-chinese-formal|trad-chinese-informal|upper-alpha|upper-armenian|upper-latin|upper-roman)|none)\\b",
"name": "support.constant.property-value.counter-style.less"
}
]
}
]
}
]
}
]
},
"cross-fade-function": {
"patterns": [
{
"begin": "\\b(cross-fade)(?=\\()",
"beginCaptures": {
"1": {
"name": "support.function.image.less"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.group.end.less"
}
},
"name": "meta.function-call.less",
"patterns": [
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.group.begin.less"
}
},
"end": "(?=\\))",
"patterns": [
{
"include": "#comma-delimiter"
},
{
"include": "#percentage-type"
},
{
"include": "#color-values"
},
{
"include": "#image-type"
},
{
"include": "#literal-string"
},
{
"include": "#unquoted-string"
}
]
}
]
}
]
},
"cubic-bezier-function": {
"begin": "\\b(cubic-bezier)(\\()",
"beginCaptures": {
"1": {
"name": "support.function.timing.less"
},
"2": {
"name": "punctuation.definition.group.begin.less"
}
},
"contentName": "meta.group.less",
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.group.end.less"
}
},
"name": "meta.function-call.less",
"patterns": [
{
"include": "#less-functions"
},
{
"include": "#calc-function"
},
{
"include": "#less-variables"
},
{
"include": "#var-function"
},
{
"include": "#comma-delimiter"
},
{
"include": "#number-type"
}
]
},
"custom-property-name": {
"captures": {
"1": {
"name": "punctuation.definition.custom-property.less"
},
"2": {
"name": "support.type.custom-property.name.less"
}
},
"match": "\\s*(--)((?:[-\\w[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}[\\t\\n\\f\\s]?|[^\\n\\f\\h]))+)",
"name": "support.type.custom-property.less"
},
"dimensions": {
"patterns": [
{
"include": "#angle-type"
},
{
"include": "#frequency-type"
},
{
"include": "#time-type"
},
{
"include": "#percentage-type"
},
{
"include": "#length-type"
}
]
},
"filter-function": {
"begin": "\\b(filter)(?=\\()",
"beginCaptures": {
"1": {
"name": "support.function.filter.less"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.group.end.less"
}
},
"name": "meta.function-call.less",
"patterns": [
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.group.begin.less"
}
},
"end": "(?=\\))",
"name": "meta.group.less",
"patterns": [
{
"include": "#comma-delimiter"
},
{
"include": "#image-type"
},
{
"include": "#literal-string"
},
{
"include": "#filter-functions"
}
]
}
]
},
"filter-functions": {
"patterns": [
{
"include": "#less-functions"
},
{
"begin": "\\b(blur)(?=\\()",
"beginCaptures": {
"1": {
"name": "support.function.filter.less"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.group.end.less"
}
},
"name": "meta.function-call.less",
"patterns": [
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.group.begin.less"
}
},
"end": "(?=\\))",
"patterns": [
{
"include": "#length-type"
}
]
}
]
},
{
"begin": "\\b(brightness|contrast|grayscale|invert|opacity|saturate|sepia)(?=\\()",
"beginCaptures": {
"1": {
"name": "support.function.filter.less"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.group.end.less"
}
},
"name": "meta.function-call.less",
"patterns": [
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.group.begin.less"
}
},
"end": "(?=\\))",
"patterns": [
{
"include": "#percentage-type"
},
{
"include": "#number-type"
},
{
"include": "#less-functions"
}
]
}
]
},
{
"begin": "\\b(drop-shadow)(?=\\()",
"beginCaptures": {
"1": {
"name": "support.function.filter.less"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.group.end.less"
}
},
"name": "meta.function-call.less",
"patterns": [
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.group.begin.less"
}
},
"end": "(?=\\))",
"patterns": [
{
"include": "#length-type"
},
{
"include": "#color-values"
}
]
}
]
},
{
"begin": "\\b(hue-rotate)(?=\\()",
"beginCaptures": {
"1": {
"name": "support.function.filter.less"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.group.end.less"
}
},
"name": "meta.function-call.less",
"patterns": [
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.group.begin.less"
}
},
"end": "(?=\\))",
"patterns": [
{
"include": "#angle-type"
}
]
}
]
}
]
},
"fit-content-function": {
"begin": "\\b(fit-content)(?=\\()",
"beginCaptures": {
"1": {
"name": "support.function.grid.less"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.group.end.less"
}
},
"name": "meta.function-call.less",
"patterns": [
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.group.begin.less"
}
},
"end": "(?=\\))",
"patterns": [
{
"include": "#less-variables"
},
{
"include": "#var-function"
},
{
"include": "#calc-function"
},
{
"include": "#percentage-type"
},
{
"include": "#length-type"
}
]
}
]
},
"format-function": {
"patterns": [
{
"begin": "\\b(format)(?=\\()",
"beginCaptures": {
"0": {
"name": "support.function.format.less"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.group.end.less"
}
},
"name": "meta.function-call.less",
"patterns": [
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.group.begin.less"
}
},
"end": "(?=\\))",
"patterns": [
{
"include": "#literal-string"
}
]
}
]
}
]
},
"frequency-type": {
"captures": {
"1": {
"name": "keyword.other.unit.less"
}
},
"match": "(?i:[-+]?(?:\\d*\\.\\d+(?:[Ee][-+]?\\d+)*|[-+]?\\d+)((?:|k)Hz))\\b",
"name": "constant.numeric.less"
},
"global-property-values": {
"match": "\\b(?:initial|inherit|unset|revert-layer|revert)\\b",
"name": "support.constant.property-value.less"
},
"gradient-functions": {
"patterns": [
{
"begin": "\\b((?:repeating-)?linear-gradient)(?=\\()",
"beginCaptures": {
"1": {
"name": "support.function.gradient.less"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.group.end.less"
}
},
"name": "meta.function-call.less",
"patterns": [
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.group.begin.less"
}
},
"end": "(?=\\))",
"patterns": [
{
"include": "#less-variables"
},
{
"include": "#var-function"
},
{
"include": "#angle-type"
},
{
"include": "#color-values"
},
{
"include": "#percentage-type"
},
{
"include": "#length-type"
},
{
"include": "#comma-delimiter"
},
{
"match": "\\bto\\b",
"name": "keyword.other.less"
},
{
"match": "\\b(top|right|bottom|left)\\b",
"name": "support.constant.property-value.less"
}
]
}
]
},
{
"begin": "\\b((?:repeating-)?radial-gradient)(?=\\()",
"beginCaptures": {
"1": {
"name": "support.function.gradient.less"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.group.end.less"
}
},
"name": "meta.function-call.less",
"patterns": [
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.group.begin.less"
}
},
"end": "(?=\\))",
"patterns": [
{
"include": "#less-variables"
},
{
"include": "#var-function"
},
{
"include": "#color-values"
},
{
"include": "#percentage-type"
},
{
"include": "#length-type"
},
{
"include": "#comma-delimiter"
},
{
"match": "\\b(at|circle|ellipse)\\b",
"name": "keyword.other.less"
},
{
"match": "\\b(top|right|bottom|left|center|((?:farth|clos)est)-(corner|side))\\b",
"name": "support.constant.property-value.less"
}
]
}
]
}
]
},
"grid-repeat-function": {
"begin": "\\b(repeat)(?=\\()",
"beginCaptures": {
"1": {
"name": "support.function.grid.less"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.group.end.less"
}
},
"name": "meta.function-call.less",
"patterns": [
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.group.begin.less"
}
},
"end": "(?=\\))",
"patterns": [
{
"include": "#comma-delimiter"
},
{
"include": "#var-function"
},
{
"include": "#length-type"
},
{
"include": "#percentage-type"
},
{
"include": "#minmax-function"
},
{
"include": "#integer-type"
},
{
"match": "\\b(auto-(fi(?:ll|t)))\\b",
"name": "support.keyword.repetitions.less"
},
{
"match": "\\b(((m(?:ax|in))-content)|auto)\\b",
"name": "support.constant.property-value.less"
}
]
}
]
},
"image-function": {
"begin": "\\b(image)(?=\\()",
"beginCaptures": {
"1": {
"name": "support.function.image.less"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.group.end.less"
}
},
"name": "meta.function-call.less",
"patterns": [
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.group.begin.less"
}
},
"end": "(?=\\))",
"patterns": [
{
"include": "#image-type"
},
{
"include": "#literal-string"
},
{
"include": "#color-values"
},
{
"include": "#comma-delimiter"
},
{
"include": "#unquoted-string"
}
]
}
]
},
"image-type": {
"patterns": [
{
"include": "#cross-fade-function"
},
{
"include": "#gradient-functions"
},
{
"include": "#image-function"
},
{
"include": "#url-function"
}
]
},
"important": {
"captures": {
"1": {
"name": "punctuation.separator.less"
}
},
"match": "(!)\\s*important",
"name": "keyword.other.important.less"
},
"integer-type": {
"match": "[-+]?\\d+",
"name": "constant.numeric.less"
},
"keyframe-name": {
"begin": "\\s*(-?(?:[_a-z[^\\x00-\\x7F]]|(?:(:?\\\\[0-9a-f]{1,6}(\\r\\n|[\\t\\n\\f\\r\\s])?)|\\\\[^\\n\\f\\r0-9a-f]))(?:[-0-9_a-z[^\\x00-\\x7F]]|(?:(:?\\\\[0-9a-f]{1,6}(\\r\\n|[\\t\\n\\f\\r])?)|\\\\[^\\n\\f\\r0-9a-f]))*)?",
"beginCaptures": {
"1": {
"name": "variable.other.constant.animation-name.less"
}
},
"end": "\\s*(?:(,)|(?=[;{]))",
"endCaptures": {
"1": {
"name": "punctuation.definition.arbitrary-repetition.less"
}
}
},
"length-type": {
"patterns": [
{
"captures": {
"1": {
"name": "keyword.other.unit.less"
}
},
"match": "[-+]?(?:\\d+\\.\\d+|\\.?\\d+)(?:[Ee][-+]?\\d+)?(em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|[mq]|in|pt|pc|px|fr|dpi|dpcm|dppx|x)",
"name": "constant.numeric.less"
},
{
"match": "\\b[-+]?0\\b",
"name": "constant.numeric.less"
}
]
},
"less-boolean-function": {
"begin": "\\b(boolean)(?=\\()",
"beginCaptures": {
"1": {
"name": "support.function.boolean.less"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.group.end.less"
}
},
"name": "meta.function-call.less",
"patterns": [