Skip to content

Commit c81abf5

Browse files
committed
Tweak highlighting of @tailwind utilities source(…)
1 parent 2d7a99d commit c81abf5

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

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

+15-4
Original file line numberDiff line numberDiff line change
@@ -457,15 +457,26 @@
457457
"source-fn": {
458458
"patterns": [
459459
{
460-
"begin": "(?i)(source)[(](?=.*?[)])",
460+
"begin": "(?i)(?:\\s*)(?<![\\w@-])(source)([(])",
461461
"beginCaptures": {
462462
"1": {
463-
"name": "punctuation.definition.keyword.css"
463+
"name": "support.function.source.css"
464+
},
465+
"2": {
466+
"name": "punctuation.section.function.begin.bracket.round.css"
467+
}
468+
},
469+
"end": "[)]",
470+
"endCaptures": {
471+
"0": {
472+
"name": "punctuation.section.function.end.bracket.round.css"
464473
}
465474
},
466-
"name": "variable.parameter.tailwind.source",
467-
"end": "(?<=[)])(?!\\G)",
468475
"patterns": [
476+
{
477+
"match": "none(?=[)])",
478+
"name": "variable.other.css"
479+
},
469480
{
470481
"include": "source.css#string"
471482
}

0 commit comments

Comments
 (0)