Skip to content

Commit 636fbb5

Browse files
committed
Fix syntax highlighting for @tailwind utilities source(…)
1 parent 741cd18 commit 636fbb5

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

packages/vscode-tailwindcss/syntaxes/at-rules.tmLanguage.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
{
2929
"include": "source.css#escapes"
3030
},
31+
{
32+
"include": "#source-fn"
33+
},
3134
{
3235
"match": "[^\\s;]+?",
3336
"name": "variable.parameter.tailwind.tailwind"
@@ -446,6 +449,36 @@
446449
"name": "punctuation.terminator.rule.css"
447450
}
448451
]
452+
},
453+
"source-fn": {
454+
"patterns": [
455+
{
456+
"begin": "(?i)(?:\\s*)(?<![\\w@-])(source)([(])",
457+
"beginCaptures": {
458+
"1": {
459+
"name": "support.function.source.css"
460+
},
461+
"2": {
462+
"name": "punctuation.section.function.begin.bracket.round.css"
463+
}
464+
},
465+
"end": "[)]",
466+
"endCaptures": {
467+
"0": {
468+
"name": "punctuation.section.function.end.bracket.round.css"
469+
}
470+
},
471+
"patterns": [
472+
{
473+
"match": "none(?=[)])",
474+
"name": "variable.other.css"
475+
},
476+
{
477+
"include": "source.css#string"
478+
}
479+
]
480+
}
481+
]
449482
}
450483
}
451484
}

0 commit comments

Comments
 (0)