|
1 | | -(comment) @comment |
| 1 | +[ |
| 2 | + "@media" |
| 3 | + "@charset" |
| 4 | + "@namespace" |
| 5 | + "@supports" |
| 6 | + "@keyframes" |
| 7 | + (at_keyword) |
| 8 | + ] @keyword.directive |
2 | 9 |
|
3 | | -;; (selectors) @function |
| 10 | +"@import" @keyword.import |
| 11 | + |
| 12 | +[ |
| 13 | + (to) |
| 14 | + (from) |
| 15 | + ] @keyword |
| 16 | + |
| 17 | +(comment) @comment @spell |
4 | 18 |
|
5 | 19 | (tag_name) @tag |
6 | | -(nesting_selector) @tag |
7 | | -(universal_selector) @tag |
8 | | - |
9 | | -(id_selector) @function |
10 | | -(class_selector) @type |
11 | | - |
12 | | -"~" @operator |
13 | | -">" @operator |
14 | | -"+" @operator |
15 | | -"-" @operator |
16 | | -"*" @operator |
17 | | -"/" @operator |
18 | | -"=" @operator |
19 | | -"^=" @operator |
20 | | -"|=" @operator |
21 | | -"~=" @operator |
22 | | -"$=" @operator |
23 | | -"*=" @operator |
24 | | - |
25 | | -"and" @operator |
26 | | -"or" @operator |
27 | | -"not" @operator |
28 | | -"only" @operator |
29 | | - |
30 | | -(attribute_selector (plain_value) @string) |
31 | | -(pseudo_element_selector (tag_name) @attribute) |
32 | | -(pseudo_class_selector (class_name) @attribute) |
33 | | - |
34 | | -;; (class_name) @property |
35 | | -;; (id_name) @property |
36 | | -(namespace_name) @property |
37 | | -(property_name) @variable |
38 | | -(feature_name) @property |
39 | | - |
40 | | -(attribute_name) @attribute |
| 20 | +(class_name) @tag |
| 21 | +(id_name) @tag |
| 22 | + |
| 23 | +[ |
| 24 | + (property_name) |
| 25 | + (feature_name) |
| 26 | + ] @property |
| 27 | + |
| 28 | +[ |
| 29 | + (nesting_selector) |
| 30 | + (universal_selector) |
| 31 | + ] @character.special |
41 | 32 |
|
42 | 33 | (function_name) @function |
43 | 34 |
|
| 35 | +[ |
| 36 | + "~" |
| 37 | + ">" |
| 38 | + "+" |
| 39 | + "-" |
| 40 | + "*" |
| 41 | + "/" |
| 42 | + "=" |
| 43 | + "^=" |
| 44 | + "|=" |
| 45 | + "~=" |
| 46 | + "$=" |
| 47 | + "*=" |
| 48 | + ] @operator |
| 49 | + |
| 50 | +[ |
| 51 | + "and" |
| 52 | + "or" |
| 53 | + "not" |
| 54 | + "only" |
| 55 | + ] @keyword.operator |
| 56 | + |
| 57 | +(important) @keyword.modifier |
| 58 | + |
| 59 | +(attribute_selector |
| 60 | + (plain_value) @string) |
| 61 | + |
| 62 | +(pseudo_element_selector |
| 63 | + "::" |
| 64 | + (tag_name) @attribute) |
| 65 | + |
| 66 | +(pseudo_class_selector |
| 67 | + (class_name) @attribute) |
| 68 | + |
| 69 | +(attribute_name) @tag.attribute |
| 70 | + |
| 71 | +(namespace_name) @module |
| 72 | + |
44 | 73 | ((property_name) @variable |
45 | | - (.match? @variable "^--")) |
| 74 | + (#lua-match? @variable "^[-][-]")) |
| 75 | + |
46 | 76 | ((plain_value) @variable |
47 | | - (.match? @variable "^--")) |
48 | | - |
49 | | -"@media" @keyword |
50 | | -"@import" @keyword |
51 | | -"@charset" @keyword |
52 | | -"@namespace" @keyword |
53 | | -"@supports" @keyword |
54 | | -"@keyframes" @keyword |
55 | | -(at_keyword) @keyword |
56 | | -(to) @keyword |
57 | | -(from) @keyword |
58 | | -(important) @keyword |
59 | | - |
60 | | -(string_value) @string |
61 | | -(color_value) @string.special |
62 | | - |
63 | | -(unit) @type |
| 77 | + (#lua-match? @variable "^[-][-]")) |
| 78 | + |
| 79 | +[ |
| 80 | + (string_value) |
| 81 | + (color_value) |
| 82 | + (unit) |
| 83 | + ] @string |
| 84 | + |
64 | 85 | (integer_value) @number |
65 | | -(float_value) @number |
66 | | -(plain_value) @keyword |
67 | | -;; (color_value) @attribute |
68 | 86 |
|
69 | | -"#" @punctuation.delimiter |
70 | | -"," @punctuation.delimiter |
| 87 | +(float_value) @number.float |
| 88 | + |
| 89 | +[ |
| 90 | + "#" |
| 91 | + "," |
| 92 | + "." |
| 93 | + ":" |
| 94 | + "::" |
| 95 | + ";" |
| 96 | + ] @punctuation.delimiter |
| 97 | + |
| 98 | +[ |
| 99 | + "{" |
| 100 | + ")" |
| 101 | + "(" |
| 102 | + "}" |
| 103 | + "[" |
| 104 | + "]" |
| 105 | + ] @punctuation.bracket |
0 commit comments