191 lines
4.8 KiB
JSON
191 lines
4.8 KiB
JSON
{
|
|
"scopeName": "es6.inline.scss",
|
|
"fileTypes": ["js", "jsx", "ts", "tsx"],
|
|
"injectionSelector": "L:source.js -comment -string, L:source.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string",
|
|
"patterns": [
|
|
{
|
|
"contentName": "meta.embedded.block.css",
|
|
"begin": "(?x)(\\s*?(\\w+\\.)?(?:scss)\\s*)(`)",
|
|
"beginCaptures": {
|
|
"0": {
|
|
"name": "string.template.ts, punctuation.definition.string.template.begin.ts"
|
|
},
|
|
"1": {
|
|
"name": "entity.name.function.tagged-template.ts"
|
|
}
|
|
},
|
|
"end": "(`)",
|
|
"endCaptures": {
|
|
"0": {
|
|
"name": "string.template.ts, punctuation.definition.string.template.end.ts"
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"include": "source.ts#template-substitution-element"
|
|
},
|
|
{
|
|
"include": "source.css.scss"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"include": "source.ts#template-substitution-element"
|
|
}
|
|
],
|
|
"repository": {
|
|
"reserved-words": {
|
|
"name": "support.type.property-name.css.postcss",
|
|
"match": "\\b(false|from|in|not|null|through|to|true)\\b"
|
|
},
|
|
"double-quoted": {
|
|
"patterns": [
|
|
{
|
|
"include": "#quoted-interpolation"
|
|
}
|
|
],
|
|
"begin": "\"",
|
|
"name": "string.quoted.double.css.postcss",
|
|
"end": "\""
|
|
},
|
|
"operator": {
|
|
"name": "keyword.operator.postcss",
|
|
"match": "\\+|\\s-\\s|\\s-(?=\\$)|(?<=\\()-(?=\\$)|\\s-(?=\\()|\\*|/|%|=|!|<|>|~"
|
|
},
|
|
"function-content": {
|
|
"name": "string.quoted.double.css.postcss",
|
|
"match": "(?<=url\\(|format\\(|attr\\().+?(?=\\))"
|
|
},
|
|
"double-slash": {
|
|
"patterns": [
|
|
{
|
|
"include": "#comment-tag"
|
|
}
|
|
],
|
|
"begin": "//",
|
|
"name": "comment.line.postcss",
|
|
"end": "$"
|
|
},
|
|
"numeric": {
|
|
"name": "constant.numeric.css.postcss",
|
|
"match": "(-|\\.)?[0-9]+(\\.[0-9]+)?"
|
|
},
|
|
"variable-root-css": {
|
|
"name": "variable.parameter.postcss",
|
|
"match": "(?<!&)--[\\w-]+"
|
|
},
|
|
"function": {
|
|
"name": "support.function.name.postcss",
|
|
"match": "(?<=[\\s|\\(|,|:])(?!url|format|attr)[\\w-][\\w-]*(?=\\()"
|
|
},
|
|
"rgb-value": {
|
|
"name": "constant.other.color.rgb-value.css.postcss",
|
|
"match": "(#)([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\\b"
|
|
},
|
|
"comment-tag": {
|
|
"patterns": [
|
|
{
|
|
"name": "comment.tag.postcss",
|
|
"match": "[\\w-]+"
|
|
}
|
|
],
|
|
"begin": "{{",
|
|
"name": "comment.tags.postcss",
|
|
"end": "}}"
|
|
},
|
|
"interpolation": {
|
|
"patterns": [
|
|
{
|
|
"include": "#variable"
|
|
},
|
|
{
|
|
"include": "#numeric"
|
|
},
|
|
{
|
|
"include": "#operator"
|
|
},
|
|
{
|
|
"include": "#unit"
|
|
},
|
|
{
|
|
"include": "#double-quoted"
|
|
},
|
|
{
|
|
"include": "#single-quoted"
|
|
}
|
|
],
|
|
"begin": "#{",
|
|
"name": "support.function.interpolation.postcss",
|
|
"end": "}"
|
|
},
|
|
"unit": {
|
|
"name": "keyword.other.unit.css.postcss",
|
|
"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|%)"
|
|
},
|
|
"function-content-var": {
|
|
"name": "variable.parameter.postcss",
|
|
"match": "(?<=var\\()[\\w-]+(?=\\))"
|
|
},
|
|
"dotdotdot": {
|
|
"name": "variable.other",
|
|
"match": "\\.{3}"
|
|
},
|
|
"variable": {
|
|
"name": "variable.parameter.postcss",
|
|
"match": "\\$[\\w-]+"
|
|
},
|
|
"single-quoted": {
|
|
"patterns": [
|
|
{
|
|
"include": "#quoted-interpolation"
|
|
}
|
|
],
|
|
"begin": "'",
|
|
"name": "string.quoted.single.css.postcss",
|
|
"end": "'"
|
|
},
|
|
"quoted-interpolation": {
|
|
"patterns": [
|
|
{
|
|
"include": "#variable"
|
|
},
|
|
{
|
|
"include": "#numeric"
|
|
},
|
|
{
|
|
"include": "#operator"
|
|
},
|
|
{
|
|
"include": "#unit"
|
|
}
|
|
],
|
|
"begin": "#{",
|
|
"name": "support.function.interpolation.postcss",
|
|
"end": "}"
|
|
},
|
|
"pseudo-class": {
|
|
"name": "entity.other.attribute-name.pseudo-class.css.postcss",
|
|
"match": ":[a-z:-]+"
|
|
},
|
|
"property-value": {
|
|
"name": "meta.property-value.css.postcss, support.constant.property-value.css.postcss",
|
|
"match": "[\\w-]+"
|
|
},
|
|
"placeholder-selector": {
|
|
"begin": "(?<!\\d)%(?!\\d)",
|
|
"name": "entity.other.attribute-name.placeholder-selector.postcss",
|
|
"end": "$\\n?|\\s|(?=;|{)"
|
|
},
|
|
"flag": {
|
|
"name": "keyword.other.important.css.postcss",
|
|
"match": "!(important|default|optional|global)"
|
|
},
|
|
"parent-selector": {
|
|
"name": "entity.name.tag.css.postcss",
|
|
"match": "&"
|
|
}
|
|
},
|
|
"foldingStartMarker": "/\\*|^#|^\\*|^\\b|^\\.",
|
|
"foldingStopMarker": "\\*/|^\\s*$"
|
|
}
|