Skip to content

Commit 3651736

Browse files
authored
Feedback: variables render differently in Insiders (microsoft#245650)
Fixes microsoft#244579
1 parent 21ff121 commit 3651736

2 files changed

Lines changed: 21 additions & 16 deletions

File tree

extensions/vscode-colorize-tests/test/colorize-tree-sitter-results/test-variables_css.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
},
170170
{
171171
"c": "var",
172-
"t": "support.function.css",
172+
"t": "support.function.css meta.function.variable.css",
173173
"r": {
174174
"dark_plus": "support.function: #DCDCAA",
175175
"light_plus": "support.function: #795E26",
@@ -197,16 +197,16 @@
197197
},
198198
{
199199
"c": "--spacing-unit",
200-
"t": "support.constant.property-value.css",
200+
"t": "support.constant.property-value.css variable.argument.css",
201201
"r": {
202-
"dark_plus": "support.constant.property-value: #CE9178",
203-
"light_plus": "support.constant.property-value: #0451A5",
202+
"dark_plus": "variable: #9CDCFE",
203+
"light_plus": "variable: #001080",
204204
"dark_vs": "default: #D4D4D4",
205205
"light_vs": "support.constant.property-value: #0451A5",
206-
"hc_black": "support.constant.property-value: #CE9178",
207-
"dark_modern": "support.constant.property-value: #CE9178",
208-
"hc_light": "support.constant.property-value: #0451A5",
209-
"light_modern": "support.constant.property-value: #0451A5"
206+
"hc_black": "variable: #9CDCFE",
207+
"dark_modern": "variable: #9CDCFE",
208+
"hc_light": "variable: #001080",
209+
"light_modern": "variable: #001080"
210210
}
211211
},
212212
{
@@ -379,7 +379,7 @@
379379
},
380380
{
381381
"c": "var",
382-
"t": "support.function.css",
382+
"t": "support.function.css meta.function.variable.css",
383383
"r": {
384384
"dark_plus": "support.function: #DCDCAA",
385385
"light_plus": "support.function: #795E26",
@@ -407,16 +407,16 @@
407407
},
408408
{
409409
"c": "--spacing-unit",
410-
"t": "support.constant.property-value.css",
410+
"t": "support.constant.property-value.css variable.argument.css",
411411
"r": {
412-
"dark_plus": "support.constant.property-value: #CE9178",
413-
"light_plus": "support.constant.property-value: #0451A5",
412+
"dark_plus": "variable: #9CDCFE",
413+
"light_plus": "variable: #001080",
414414
"dark_vs": "default: #D4D4D4",
415415
"light_vs": "support.constant.property-value: #0451A5",
416-
"hc_black": "support.constant.property-value: #CE9178",
417-
"dark_modern": "support.constant.property-value: #CE9178",
418-
"hc_light": "support.constant.property-value: #0451A5",
419-
"light_modern": "support.constant.property-value: #0451A5"
416+
"hc_black": "variable: #9CDCFE",
417+
"dark_modern": "variable: #9CDCFE",
418+
"hc_light": "variable: #001080",
419+
"light_modern": "variable: #001080"
420420
}
421421
},
422422
{

src/vs/editor/common/languages/highlights/css.scm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@
9292
((color_value) @constant.other.color.rgb-value.hex.css
9393
(#match? @constant.other.color.rgb-value.hex.css "^#.*"))
9494

95+
(call_expression
96+
(function_name) @meta.function.variable.css (#eq? @meta.function.variable.css "var")
97+
(arguments
98+
(plain_value) @variable.argument.css))
99+
95100
; Special Functions
96101

97102
(call_expression

0 commit comments

Comments
 (0)