kjelsrud.dev/node_modules/shiki/languages/sass.tmLanguage.json

616 lines
14 KiB
JSON
Raw Normal View History

2023-07-19 21:31:30 +02:00
{
"fileTypes": ["sass"],
"foldingStartMarker": "/\\*|^#|^\\*|^\\b|*#?region|^\\.",
"foldingStopMarker": "\\*/|*#?endregion|^\\s*$",
"name": "sass",
"patterns": [
{
"begin": "^(\\s*)(/\\*)",
"end": "(\\*/)|^(?!\\s\\1)",
"name": "comment.block.sass",
"patterns": [
{
"include": "#comment-tag"
},
{
"include": "#comment-param"
}
]
},
{
"match": "^[\\t ]*/?//[\\t ]*[SRI][\\t ]*$",
"name": "keyword.other.sass.formatter.action"
},
{
"begin": "^[\\t ]*//[\\t ]*(import)[\\t ]*(css-variables)[\\t ]*(from)",
"end": "$\\n?",
"name": "comment.import.css.variables",
"captures": {
"1": {
"name": "keyword.control"
},
"2": {
"name": "variable"
},
"3": {
"name": "keyword.control"
}
},
"patterns": [
{
"include": "#import-quotes"
}
]
},
{
"include": "#double-slash"
},
{
"include": "#double-quoted"
},
{
"include": "#single-quoted"
},
{
"include": "#interpolation"
},
{
"include": "#curly-brackets"
},
{
"include": "#placeholder-selector"
},
{
"begin": "\\$[a-zA-Z0-9_-]+(?=:)",
"end": "$\\n?|(?=\\)\\s\\)|\\)\\n)",
"name": "sass.script.maps",
"captures": {
"0": {
"name": "variable.other.name"
}
},
"patterns": [
{
"include": "#double-slash"
},
{
"include": "#double-quoted"
},
{
"include": "#single-quoted"
},
{
"include": "#interpolation"
},
{
"include": "#variable"
},
{
"include": "#rgb-value"
},
{
"include": "#numeric"
},
{
"include": "#unit"
},
{
"include": "#flag"
},
{
"include": "#comma"
},
{
"include": "#function"
},
{
"include": "#function-content"
},
{
"include": "#operator"
},
{
"include": "#reserved-words"
},
{
"include": "#parent-selector"
},
{
"include": "#property-value"
},
{
"include": "#semicolon"
},
{
"include": "#dotdotdot"
}
]
},
{
"include": "#variable-root"
},
{
"include": "#numeric"
},
{
"include": "#unit"
},
{
"include": "#flag"
},
{
"include": "#comma"
},
{
"include": "#semicolon"
},
{
"include": "#dotdotdot"
},
{
"begin": "@include|\\+(?!\\W|\\d)",
"end": "(?=\\n|\\()",
"name": "support.function.name.sass.library",
"captures": {
"0": {
"name": "keyword.control.at-rule.css.sass"
}
}
},
{
"begin": "^(@use)",
"end": "(?=\\n)",
"name": "sass.use",
"captures": {
"0": {
"name": "keyword.control.at-rule.css.sass.use"
}
},
"patterns": [
{
"match": "as|with",
"name": "support.type.css.sass"
},
{
"include": "#numeric"
},
{
"include": "#unit"
},
{
"include": "#variable-root"
},
{
"include": "#rgb-value"
},
{
"include": "#comma"
},
{
"include": "#parenthesis-open"
},
{
"include": "#parenthesis-close"
},
{
"include": "#colon"
},
{
"include": "#import-quotes"
}
]
},
{
"begin": "^@import(.*?)( as.*)?$",
"end": "(?=\\n)",
"name": "keyword.control.at-rule.use",
"captures": {
"1": {
"name": "constant.character.css.sass"
},
"2": {
"name": "invalid"
}
}
},
{
"begin": "@mixin|^[\\t ]*=|@function",
"end": "$\\n?|(?=\\()",
"name": "support.function.name.sass",
"captures": {
"0": {
"name": "keyword.control.at-rule.css.sass"
}
},
"patterns": [
{
"match": "[\\w-]+",
"name": "entity.name.function"
}
]
},
{
"begin": "@",
"end": "$\\n?|\\s(?!(all|braille|embossed|handheld|print|projection|screen|speech|tty|tv|if|only|not)(\\s|,))",
"name": "keyword.control.at-rule.css.sass"
},
{
"begin": "(?<!\\-|\\()\\b(a|abbr|acronym|address|applet|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|embed|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|picture|pre|progress|q|samp|script|section|select|small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video|main|svg|rect|ruby|center|circle|ellipse|line|polyline|polygon|path|text|u|slot)\\b(?!-|\\)|:\\s)|&",
"end": "$\\n?|(?=\\s|,|\\(|\\)|\\.|\\#|\\[|>|-|_)",
"name": "entity.name.tag.css.sass.symbol",
"patterns": [
{
"include": "#interpolation"
},
{
"include": "#pseudo-class"
}
]
},
{
"begin": "#",
"end": "$\\n?|(?=\\s|,|\\(|\\)|\\.|\\[|>)",
"name": "entity.other.attribute-name.id.css.sass",
"patterns": [
{
"include": "#interpolation"
},
{
"include": "#pseudo-class"
}
]
},
{
"begin": "\\.|(?<=&)(-|_)",
"end": "$\\n?|(?=\\s|,|\\(|\\)|\\[|>)",
"name": "entity.other.attribute-name.class.css.sass",
"patterns": [
{
"include": "#interpolation"
},
{
"include": "#pseudo-class"
}
]
},
{
"begin": "\\[",
"end": "\\]",
"name": "entity.other.attribute-selector.sass",
"patterns": [
{
"include": "#double-quoted"
},
{
"include": "#single-quoted"
},
{
"match": "\\^|\\$|\\*|~",
"name": "keyword.other.regex.sass"
}
]
},
{
"match": "^((?<=\\]|\\)|not\\(|\\*|>|>\\s)|\n*):[a-z:-]+|(::|:-)[a-z:-]+",
"name": "entity.other.attribute-name.pseudo-class.css.sass"
},
{
"include": "#module"
},
{
"match": "[\\w-]*\\(",
"name": "entity.name.function"
},
{
"match": "\\)",
"name": "entity.name.function.close"
},
{
"begin": ":",
"end": "$\\n?|(?=\\s\\(|and\\(|\\),)",
"name": "meta.property-list.css.sass.prop",
"patterns": [
{
"match": "(?<=:)[a-z-]+\\s",
"name": "support.type.property-name.css.sass.prop.name"
},
{
"include": "#double-slash"
},
{
"include": "#double-quoted"
},
{
"include": "#single-quoted"
},
{
"include": "#interpolation"
},
{
"include": "#curly-brackets"
},
{
"include": "#variable"
},
{
"include": "#rgb-value"
},
{
"include": "#numeric"
},
{
"include": "#unit"
},
{
"include": "#module"
},
{
"match": "--.+?(?=\\))",
"name": "variable.css"
},
{
"match": "[\\w-]*\\(",
"name": "entity.name.function"
},
{
"match": "\\)",
"name": "entity.name.function.close"
},
{
"include": "#flag"
},
{
"include": "#comma"
},
{
"include": "#semicolon"
},
{
"include": "#function"
},
{
"include": "#function-content"
},
{
"include": "#operator"
},
{
"include": "#parent-selector"
},
{
"include": "#property-value"
}
]
},
{
"include": "#rgb-value"
},
{
"include": "#function"
},
{
"include": "#function-content"
},
{
"begin": "(?<=})(?!\\n|\\(|\\)|[a-zA-Z0-9_-]+:)",
"end": "\\s|(?=,|\\.|\\[|\\)|\\n)",
"name": "entity.name.tag.css.sass",
"patterns": [
{
"include": "#interpolation"
},
{
"include": "#pseudo-class"
}
]
},
{
"include": "#operator"
},
{
"match": "[a-z-]+((?=:|#{))",
"name": "support.type.property-name.css.sass.prop.name"
},
{
"include": "#reserved-words"
},
{
"include": "#property-value"
}
],
"repository": {
"module": {
"match": "([\\w-]+?)(\\.)",
"name": "constant.character.module",
"captures": {
"1": {
"name": "constant.character.module.name"
},
"2": {
"name": "constant.numeric.module.dot"
}
}
},
"comma": {
"match": "\\band\\b|\\bor\\b|,",
"name": "comment.punctuation.comma.sass"
},
"comment-tag": {
"begin": "(?<={{)",
"end": "(?=}})",
"name": "comment.tag.sass"
},
"comment-param": {
"match": "\\@(\\w+)",
"name": "storage.type.class.jsdoc"
},
"curly-brackets": {
"match": "{|}",
"name": "invalid"
},
"dotdotdot": {
"match": "\\.\\.\\.",
"name": "variable.other"
},
"double-slash": {
"begin": "//",
"end": "$\\n?",
"name": "comment.line.sass",
"patterns": [
{
"include": "#comment-tag"
}
]
},
"double-quoted": {
"begin": "\"",
"end": "\"",
"name": "string.quoted.double.css.sass",
"patterns": [
{
"include": "#quoted-interpolation"
}
]
},
"flag": {
"match": "!(important|default|optional|global)",
"name": "keyword.other.important.css.sass"
},
"function": {
"match": "(?<=[\\s|\\(|,|:])(?!url|format|attr)[a-zA-Z0-9_-][\\w-]*(?=\\()",
"name": "support.function.name.sass"
},
"function-content": {
"begin": "(?<=url\\(|format\\(|attr\\()",
"end": ".(?=\\))",
"name": "string.quoted.double.css.sass"
},
"parenthesis-open": {
"match": "\\(",
"name": "entity.name.function.parenthesis.open"
},
"parenthesis-close": {
"match": "\\)",
"name": "entity.name.function.parenthesis.close"
},
"colon": {
"match": ":",
"name": "meta.property-list.css.sass.colon"
},
"interpolation": {
"begin": "#{",
"end": "}",
"name": "support.function.interpolation.sass",
"patterns": [
{
"include": "#variable"
},
{
"include": "#numeric"
},
{
"include": "#operator"
},
{
"include": "#unit"
},
{
"include": "#comma"
},
{
"include": "#double-quoted"
},
{
"include": "#single-quoted"
}
]
},
"numeric": {
"match": "(-|\\.)?[0-9]+(\\.[0-9]+)?",
"name": "constant.numeric.css.sass"
},
"operator": {
"match": "\\+|\\s-\\s|\\s-(?=\\$)|(?<=\\()-(?=\\$)|\\s-(?=\\()|\\*|/|%|=|!|<|>|~",
"name": "keyword.operator.sass"
},
"parent-selector": {
"match": "&",
"name": "entity.name.tag.css.sass"
},
"placeholder-selector": {
"begin": "(?<!\\d)%(?!\\d)",
"end": "$\\n?|\\s",
"name": "entity.other.inherited-class.placeholder-selector.css.sass"
},
"property-value": {
"match": "[a-zA-Z0-9_-]+",
"name": "meta.property-value.css.sass support.constant.property-value.css.sass"
},
"pseudo-class": {
"match": ":[a-z:-]+",
"name": "entity.other.attribute-name.pseudo-class.css.sass"
},
"quoted-interpolation": {
"begin": "#{",
"end": "}",
"name": "support.function.interpolation.sass",
"patterns": [
{
"include": "#variable"
},
{
"include": "#numeric"
},
{
"include": "#operator"
},
{
"include": "#unit"
},
{
"include": "#comma"
}
]
},
"reserved-words": {
"match": "\\b(false|from|in|not|null|through|to|true)\\b",
"name": "support.type.property-name.css.sass"
},
"rgb-value": {
"match": "(#)([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})\\b",
"name": "constant.language.color.rgb-value.css.sass"
},
"semicolon": {
"match": ";",
"name": "invalid"
},
"single-quoted": {
"begin": "'",
"end": "'",
"name": "string.quoted.single.css.sass",
"patterns": [
{
"include": "#quoted-interpolation"
}
]
},
"unit": {
"match": "(?<=[\\d]|})(ch|cm|deg|dpcm|dpi|dppx|em|ex|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vw|fr|%)",
"name": "keyword.control.unit.css.sass"
},
"variable-root": {
"match": "\\$[a-zA-Z0-9_-]+",
"name": "variable.other.root"
},
"variable": {
"match": "\\$[a-zA-Z0-9_-]+",
"name": "variable.other.value"
},
"import-quotes": {
"match": "[\"']?\\.{0,2}[\\w/]+[\"']?",
"name": "constant.character.css.sass"
}
},
"scopeName": "source.sass"
}