Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/editor/common/languages/highlights/css.scm
3296 views
1
; Order matters! Place lower precedence first.
2
3
[
4
"{"
5
"}"
6
"("
7
")"
8
"["
9
"]"
10
] @punctuation.css
11
12
[
13
"*="
14
] @keyword.operator.css
15
16
[
17
"+"
18
">"
19
] @keyword.operator.combinator.css
20
21
(comment) @comment.block.css
22
23
; Selectors
24
25
(selectors) @meta.selector.css
26
27
(class_selector) @entity.other.attribute-name.class.css
28
29
(id_selector) @entity.other.attribute-name.id.css
30
31
(tag_name) @entity.name.tag.css
32
33
(universal_selector) @entity.name.tag.wildcard.css
34
35
(pseudo_class_selector) @entity.other.attribute-name.pseudo-class.css
36
37
(pseudo_element_selector
38
"::" @entity.other.attribute-name.pseudo-element.css
39
.
40
(tag_name) @entity.other.attribute-name.pseudo-element.css)
41
42
(attribute_name) @entity.other.attribute-name.css
43
44
; @ Rules
45
46
[
47
("@import")
48
("@charset")
49
("@namespace")
50
("@media")
51
("@supports")
52
("@keyframes")
53
(at_keyword)
54
] @keyword.control.at-rule.css
55
56
(keyword_query) @support.constant.media.css
57
58
(keyframes_name) @variable.parameter.keyframe-list.css
59
60
; Functions
61
62
(function_name) @support.function.css
63
64
; Properties
65
66
(property_name) @support.type.property-name.css
67
68
; Other values
69
70
(plain_value) @support.constant.property-value.css
71
72
; Strings
73
74
((string_value) @string.quoted.single.css
75
(#match? @string.quoted.single.css "^'.*'$"))
76
77
((string_value) @string.quoted.double.css
78
(#match? @string.quoted.double.css "^\".*\"$"))
79
80
; Numbers
81
82
([
83
(integer_value)
84
(float_value)
85
]) @constant.numeric.css
86
87
(unit) @keyword.other.unit.css
88
89
; Special values
90
91
(declaration
92
((property_name) @support.type.property-name.css
93
(#eq? @support.type.property-name.css "font"))
94
(plain_value) @support.constant.font-name.css)
95
96
((color_value) @constant.other.color.rgb-value.hex.css
97
(#match? @constant.other.color.rgb-value.hex.css "^#.*"))
98
99
(call_expression
100
(function_name) @meta.function.variable.css (#eq? @meta.function.variable.css "var")
101
(arguments
102
(plain_value) @variable.argument.css))
103
104
; Special Functions
105
106
(call_expression
107
((function_name) @support.function.url.css
108
(#eq? @support.function.url.css "url"))
109
(arguments
110
(plain_value) @variable.parameter.url.css))
111
112
; Keywords
113
114
(important) @keyword.other.important.css
115
116