github-linguist 5.0.0 → 5.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/bin/git-linguist +10 -2
  3. data/bin/linguist +26 -9
  4. data/grammars/config.xcompose.json +83 -0
  5. data/grammars/hint.haskell.json +21 -30
  6. data/grammars/hint.message.haskell.json +21 -30
  7. data/grammars/hint.type.haskell.json +21 -30
  8. data/grammars/source.bsl.json +42 -28
  9. data/grammars/source.cs.json +656 -131
  10. data/grammars/source.csound-document.json +142 -25
  11. data/grammars/source.csound-score.json +13 -10
  12. data/grammars/source.csound.json +136 -81
  13. data/grammars/source.css.json +1501 -331
  14. data/grammars/source.css.less.json +3 -3
  15. data/grammars/source.d.json +60 -44
  16. data/grammars/source.gn.json +240 -138
  17. data/grammars/source.graphql.json +781 -155
  18. data/grammars/source.haskell.json +21 -30
  19. data/grammars/source.js.json +46 -46
  20. data/grammars/source.mask.json +1 -1
  21. data/grammars/source.perl6fe.json +1151 -763
  22. data/grammars/source.python.json +45 -23
  23. data/grammars/source.quoting.perl6fe.json +2170 -0
  24. data/grammars/source.reason.json +296 -0
  25. data/grammars/source.regexp.perl6fe.json +27 -0
  26. data/grammars/source.rust.json +522 -125
  27. data/grammars/source.sdbl.json +2 -2
  28. data/grammars/source.shell.json +125 -161
  29. data/grammars/source.solidity.json +137 -0
  30. data/grammars/source.ts.json +385 -137
  31. data/grammars/source.tsx.json +394 -167
  32. data/grammars/source.yaml.json +176 -171
  33. data/grammars/text.html.php.blade.json +2 -2
  34. data/grammars/text.tex.latex.haskell.json +1 -10
  35. data/lib/linguist/generated.rb +50 -4
  36. data/lib/linguist/heuristics.rb +1 -1
  37. data/lib/linguist/language.rb +12 -8
  38. data/lib/linguist/languages.json +1 -1
  39. data/lib/linguist/languages.yml +38 -1
  40. data/lib/linguist/samples.json +4605 -581
  41. data/lib/linguist/vendor.yml +6 -0
  42. data/lib/linguist/version.rb +1 -1
  43. metadata +10 -7
  44. data/grammars/source.hy.json +0 -270
@@ -1,263 +1,1267 @@
1
1
  {
2
+ "scopeName": "source.css",
3
+ "name": "CSS",
2
4
  "fileTypes": [
3
5
  "css",
4
6
  "css.erb"
5
7
  ],
6
- "keyEquivalent": "^~C",
7
- "name": "CSS",
8
+ "firstLineMatch": "(?xi)\n# Emacs modeline\n-\\*-(?:\\s*(?=[^:;\\s]+\\s*-\\*-)|(?:.*?[;\\s]|(?<=-\\*-))mode\\s*:\\s*)\n css\n(?=[\\s;]|(?<![-*])-\\*-).*?-\\*-\n|\n# Vim modeline\n(?:(?:\\s|^)vi(?:m[<=>]?\\d+|m)?|\\sex)(?=:(?=\\s*set?\\s[^\\n:]+:)|:(?!\\s*set?\\s))(?:(?:\\s|\\s*:\\s*)\\w*(?:\\s*=(?:[^\\n\\\\\\s]|\\\\.)*)?)*[\\s:](?:filetype|ft|syntax)\\s*=\n css\n(?=\\s|:|$)",
8
9
  "patterns": [
9
10
  {
10
11
  "include": "#comment-block"
11
12
  },
12
- {
13
- "include": "#selector"
13
+ {
14
+ "include": "#escapes"
15
+ },
16
+ {
17
+ "include": "#combinators"
18
+ },
19
+ {
20
+ "include": "#selector"
21
+ },
22
+ {
23
+ "include": "#at-rules"
24
+ },
25
+ {
26
+ "include": "#rule-list"
27
+ }
28
+ ],
29
+ "repository": {
30
+ "at-rules": {
31
+ "patterns": [
32
+ {
33
+ "begin": "\\A(?:\\xEF\\xBB\\xBF)?(?i:(?=\\s*@charset\\b))",
34
+ "end": ";|(?=$)",
35
+ "endCaptures": {
36
+ "0": {
37
+ "name": "punctuation.terminator.rule.css"
38
+ }
39
+ },
40
+ "name": "meta.at-rule.charset.css",
41
+ "patterns": [
42
+ {
43
+ "captures": {
44
+ "1": {
45
+ "name": "invalid.illegal.not-lowercase.charset.css"
46
+ },
47
+ "2": {
48
+ "name": "invalid.illegal.leading-whitespace.charset.css"
49
+ },
50
+ "3": {
51
+ "name": "invalid.illegal.no-whitespace.charset.css"
52
+ },
53
+ "4": {
54
+ "name": "invalid.illegal.whitespace.charset.css"
55
+ },
56
+ "5": {
57
+ "name": "invalid.illegal.not-double-quoted.charset.css"
58
+ },
59
+ "6": {
60
+ "name": "invalid.illegal.unclosed-string.charset.css"
61
+ },
62
+ "7": {
63
+ "name": "invalid.illegal.unexpected-characters.charset.css"
64
+ }
65
+ },
66
+ "match": "(?x) # Possible errors:\n\\G\n((?!@charset)@\\w+) # Not lowercase (@charset is case-sensitive)\n|\n\\G(\\s+) # Preceding whitespace\n|\n(@charset\\S[^;]*) # No whitespace after @charset\n|\n(?<=@charset) # Before quoted charset name\n(\\x20{2,}|\\t+) # More than one space used, or a tab\n|\n(?<=@charset\\x20) # Beginning of charset name\n([^\";]+) # Not double-quoted\n|\n(\"[^\"]+$) # Unclosed quote\n|\n(?<=\") # After charset name\n([^;]+) # Unexpected junk instead of semicolon"
67
+ },
68
+ {
69
+ "captures": {
70
+ "1": {
71
+ "name": "keyword.control.at-rule.charset.css"
72
+ },
73
+ "2": {
74
+ "name": "punctuation.definition.keyword.css"
75
+ }
76
+ },
77
+ "match": "((@)charset)(?=\\s)"
78
+ },
79
+ {
80
+ "begin": "\"",
81
+ "beginCaptures": {
82
+ "0": {
83
+ "name": "punctuation.definition.string.begin.css"
84
+ }
85
+ },
86
+ "end": "\"|$",
87
+ "endCaptures": {
88
+ "0": {
89
+ "name": "punctuation.definition.string.end.css"
90
+ }
91
+ },
92
+ "name": "string.quoted.double.css",
93
+ "patterns": [
94
+ {
95
+ "begin": "(?:\\G|^)(?=(?:[^\"])+$)",
96
+ "end": "$",
97
+ "name": "invalid.illegal.unclosed.string.css"
98
+ }
99
+ ]
100
+ }
101
+ ]
102
+ },
103
+ {
104
+ "begin": "(?i)((@)import)(?:\\s+|$|(?=['\"]|/\\*))",
105
+ "beginCaptures": {
106
+ "1": {
107
+ "name": "keyword.control.at-rule.import.css"
108
+ },
109
+ "2": {
110
+ "name": "punctuation.definition.keyword.css"
111
+ }
112
+ },
113
+ "end": ";",
114
+ "endCaptures": {
115
+ "0": {
116
+ "name": "punctuation.terminator.rule.css"
117
+ }
118
+ },
119
+ "name": "meta.at-rule.import.css",
120
+ "patterns": [
121
+ {
122
+ "begin": "\\G\\s*(?=/\\*)",
123
+ "end": "(?<=\\*/)\\s*",
124
+ "patterns": [
125
+ {
126
+ "include": "#comment-block"
127
+ }
128
+ ]
129
+ },
130
+ {
131
+ "include": "#string"
132
+ },
133
+ {
134
+ "include": "#url"
135
+ },
136
+ {
137
+ "include": "#media-query-list"
138
+ }
139
+ ]
140
+ },
141
+ {
142
+ "begin": "(?i)((@)font-face)(?=\\s*|{|/\\*|$)",
143
+ "beginCaptures": {
144
+ "1": {
145
+ "name": "keyword.control.at-rule.font-face.css"
146
+ },
147
+ "2": {
148
+ "name": "punctuation.definition.keyword.css"
149
+ }
150
+ },
151
+ "end": "(?!\\G)",
152
+ "name": "meta.at-rule.font-face.css",
153
+ "patterns": [
154
+ {
155
+ "include": "#comment-block"
156
+ },
157
+ {
158
+ "include": "#escapes"
159
+ },
160
+ {
161
+ "include": "#rule-list"
162
+ }
163
+ ]
164
+ },
165
+ {
166
+ "begin": "(?i)(@)page(?=[\\s:{]|/\\*|$)",
167
+ "captures": {
168
+ "0": {
169
+ "name": "keyword.control.at-rule.page.css"
170
+ },
171
+ "1": {
172
+ "name": "punctuation.definition.keyword.css"
173
+ }
174
+ },
175
+ "end": "(?=\\s*($|[:{;]))",
176
+ "name": "meta.at-rule.page.css",
177
+ "patterns": [
178
+ {
179
+ "include": "#rule-list"
180
+ }
181
+ ]
182
+ },
183
+ {
184
+ "begin": "(?i)(?=@media(\\s|\\(|/\\*|$))",
185
+ "end": "(?<=})",
186
+ "patterns": [
187
+ {
188
+ "begin": "(?i)\\G(@)media",
189
+ "beginCaptures": {
190
+ "0": {
191
+ "name": "keyword.control.at-rule.media.css"
192
+ },
193
+ "1": {
194
+ "name": "punctuation.definition.keyword.css"
195
+ }
196
+ },
197
+ "end": "(?=\\s*[{;])",
198
+ "name": "meta.at-rule.media.header.css",
199
+ "patterns": [
200
+ {
201
+ "include": "#media-query-list"
202
+ }
203
+ ]
204
+ },
205
+ {
206
+ "begin": "{",
207
+ "beginCaptures": {
208
+ "0": {
209
+ "name": "punctuation.section.media.begin.bracket.curly.css"
210
+ }
211
+ },
212
+ "end": "}",
213
+ "endCaptures": {
214
+ "0": {
215
+ "name": "punctuation.section.media.end.bracket.curly.css"
216
+ }
217
+ },
218
+ "name": "meta.at-rule.media.body.css",
219
+ "patterns": [
220
+ {
221
+ "include": "$self"
222
+ }
223
+ ]
224
+ }
225
+ ]
226
+ },
227
+ {
228
+ "begin": "(?i)(?=@counter-style([\\s'\"{;]|/\\*|$))",
229
+ "end": "(?<=})",
230
+ "patterns": [
231
+ {
232
+ "begin": "(?i)\\G(@)counter-style",
233
+ "beginCaptures": {
234
+ "0": {
235
+ "name": "keyword.control.at-rule.counter-style.css"
236
+ },
237
+ "1": {
238
+ "name": "punctuation.definition.keyword.css"
239
+ }
240
+ },
241
+ "end": "(?=\\s*{)",
242
+ "name": "meta.at-rule.counter-style.header.css",
243
+ "patterns": [
244
+ {
245
+ "include": "#comment-block"
246
+ },
247
+ {
248
+ "include": "#escapes"
249
+ },
250
+ {
251
+ "captures": {
252
+ "0": {
253
+ "patterns": [
254
+ {
255
+ "include": "#escapes"
256
+ }
257
+ ]
258
+ }
259
+ },
260
+ "match": "(?x)\n(?:[-a-zA-Z_] | [^\\x00-\\x7F]) # First letter\n(?:[-a-zA-Z0-9_] | [^\\x00-\\x7F] # Remainder of identifier\n |\\\\(?:[0-9a-fA-F]{1,6}|.)\n)*",
261
+ "name": "variable.parameter.style-name.css"
262
+ }
263
+ ]
264
+ },
265
+ {
266
+ "begin": "{",
267
+ "beginCaptures": {
268
+ "0": {
269
+ "name": "punctuation.section.property-list.begin.bracket.curly.css"
270
+ }
271
+ },
272
+ "end": "}",
273
+ "endCaptures": {
274
+ "0": {
275
+ "name": "punctuation.section.property-list.end.bracket.curly.css"
276
+ }
277
+ },
278
+ "name": "meta.at-rule.counter-style.body.css",
279
+ "patterns": [
280
+ {
281
+ "include": "#comment-block"
282
+ },
283
+ {
284
+ "include": "#escapes"
285
+ },
286
+ {
287
+ "include": "#rule-list-innards"
288
+ }
289
+ ]
290
+ }
291
+ ]
292
+ },
293
+ {
294
+ "begin": "(?i)(?=@document([\\s'\"{;]|/\\*|$))",
295
+ "end": "(?<=})",
296
+ "patterns": [
297
+ {
298
+ "begin": "(?i)\\G(@)document",
299
+ "beginCaptures": {
300
+ "0": {
301
+ "name": "keyword.control.at-rule.document.css"
302
+ },
303
+ "1": {
304
+ "name": "punctuation.definition.keyword.css"
305
+ }
306
+ },
307
+ "end": "(?=\\s*[{;])",
308
+ "name": "meta.at-rule.document.header.css",
309
+ "patterns": [
310
+ {
311
+ "begin": "(?i)(?<![\\w-])(url-prefix|domain|regexp)(\\()",
312
+ "beginCaptures": {
313
+ "1": {
314
+ "name": "support.function.document-rule.css"
315
+ },
316
+ "2": {
317
+ "name": "punctuation.section.function.begin.bracket.round.css"
318
+ }
319
+ },
320
+ "end": "\\)",
321
+ "endCaptures": {
322
+ "0": {
323
+ "name": "punctuation.section.function.end.bracket.round.css"
324
+ }
325
+ },
326
+ "name": "meta.function.document-rule.css",
327
+ "patterns": [
328
+ {
329
+ "include": "#string"
330
+ },
331
+ {
332
+ "include": "#comment-block"
333
+ },
334
+ {
335
+ "include": "#escapes"
336
+ },
337
+ {
338
+ "match": "[^'\")\\s]+",
339
+ "name": "variable.parameter.document-rule.css"
340
+ }
341
+ ]
342
+ },
343
+ {
344
+ "include": "#url"
345
+ },
346
+ {
347
+ "include": "#commas"
348
+ },
349
+ {
350
+ "include": "#comment-block"
351
+ },
352
+ {
353
+ "include": "#escapes"
354
+ }
355
+ ]
356
+ },
357
+ {
358
+ "begin": "{",
359
+ "beginCaptures": {
360
+ "0": {
361
+ "name": "punctuation.section.document.begin.bracket.curly.css"
362
+ }
363
+ },
364
+ "end": "}",
365
+ "endCaptures": {
366
+ "0": {
367
+ "name": "punctuation.section.document.end.bracket.curly.css"
368
+ }
369
+ },
370
+ "name": "meta.at-rule.document.body.css",
371
+ "patterns": [
372
+ {
373
+ "include": "$self"
374
+ }
375
+ ]
376
+ }
377
+ ]
378
+ },
379
+ {
380
+ "begin": "(?i)(?=@keyframes([\\s'\"{;]|/\\*|$))",
381
+ "end": "(?<=})",
382
+ "patterns": [
383
+ {
384
+ "begin": "(?i)\\G(@)keyframes",
385
+ "beginCaptures": {
386
+ "0": {
387
+ "name": "keyword.control.at-rule.keyframes.css"
388
+ },
389
+ "1": {
390
+ "name": "punctuation.definition.keyword.css"
391
+ }
392
+ },
393
+ "end": "(?=\\s*{)",
394
+ "name": "meta.at-rule.keyframes.header.css",
395
+ "patterns": [
396
+ {
397
+ "include": "#comment-block"
398
+ },
399
+ {
400
+ "include": "#escapes"
401
+ },
402
+ {
403
+ "captures": {
404
+ "0": {
405
+ "patterns": [
406
+ {
407
+ "include": "#escapes"
408
+ }
409
+ ]
410
+ }
411
+ },
412
+ "match": "(?x)\n(?:[-a-zA-Z_] | [^\\x00-\\x7F]) # First letter\n(?:[-a-zA-Z0-9_] | [^\\x00-\\x7F] # Remainder of identifier\n |\\\\(?:[0-9a-fA-F]{1,6}|.)\n)*",
413
+ "name": "variable.parameter.keyframe-list.css"
414
+ }
415
+ ]
416
+ },
417
+ {
418
+ "begin": "{",
419
+ "beginCaptures": {
420
+ "0": {
421
+ "name": "punctuation.section.keyframes.begin.bracket.curly.css"
422
+ }
423
+ },
424
+ "end": "}",
425
+ "endCaptures": {
426
+ "0": {
427
+ "name": "punctuation.section.keyframes.end.bracket.curly.css"
428
+ }
429
+ },
430
+ "name": "meta.at-rule.keyframes.body.css",
431
+ "patterns": [
432
+ {
433
+ "include": "#comment-block"
434
+ },
435
+ {
436
+ "include": "#escapes"
437
+ },
438
+ {
439
+ "captures": {
440
+ "1": {
441
+ "name": "entity.other.keyframe-offset.css"
442
+ },
443
+ "2": {
444
+ "name": "entity.other.keyframe-offset.percentage.css"
445
+ }
446
+ },
447
+ "match": "(?xi)\n(?<![\\w-]) (from|to) (?![\\w-]) # Keywords for 0% | 100%\n|\n([-+]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)%) # Percentile value"
448
+ },
449
+ {
450
+ "include": "#rule-list"
451
+ }
452
+ ]
453
+ }
454
+ ]
455
+ },
456
+ {
457
+ "begin": "(?i)(?=@supports(\\s|\\(|/\\*|$))",
458
+ "end": "(?<=})|(?=;)",
459
+ "patterns": [
460
+ {
461
+ "begin": "(?i)\\G(@)supports",
462
+ "beginCaptures": {
463
+ "0": {
464
+ "name": "keyword.control.at-rule.supports.css"
465
+ },
466
+ "1": {
467
+ "name": "punctuation.definition.keyword.css"
468
+ }
469
+ },
470
+ "end": "(?=\\s*[{;])",
471
+ "name": "meta.at-rule.supports.header.css",
472
+ "patterns": [
473
+ {
474
+ "include": "#feature-query-operators"
475
+ },
476
+ {
477
+ "include": "#feature-query"
478
+ },
479
+ {
480
+ "include": "#comment-block"
481
+ },
482
+ {
483
+ "include": "#escapes"
484
+ }
485
+ ]
486
+ },
487
+ {
488
+ "begin": "{",
489
+ "beginCaptures": {
490
+ "0": {
491
+ "name": "punctuation.section.supports.begin.bracket.curly.css"
492
+ }
493
+ },
494
+ "end": "}",
495
+ "endCaptures": {
496
+ "0": {
497
+ "name": "punctuation.section.supports.end.bracket.curly.css"
498
+ }
499
+ },
500
+ "name": "meta.at-rule.supports.body.css",
501
+ "patterns": [
502
+ {
503
+ "include": "$self"
504
+ }
505
+ ]
506
+ }
507
+ ]
508
+ },
509
+ {
510
+ "begin": "(?i)((@)viewport)(?=[\\s'\"{;]|/\\*|$)",
511
+ "beginCaptures": {
512
+ "1": {
513
+ "name": "keyword.control.at-rule.viewport.css"
514
+ },
515
+ "2": {
516
+ "name": "punctuation.definition.keyword.css"
517
+ }
518
+ },
519
+ "end": "(?=\\s*[@{;])",
520
+ "name": "meta.at-rule.viewport.css",
521
+ "patterns": [
522
+ {
523
+ "include": "#comment-block"
524
+ },
525
+ {
526
+ "include": "#escapes"
527
+ }
528
+ ]
529
+ },
530
+ {
531
+ "begin": "(?i)((@)font-feature-values)(?=[\\s'\"{;]|/\\*|$)\\s*",
532
+ "beginCaptures": {
533
+ "1": {
534
+ "name": "keyword.control.at-rule.font-feature-values.css"
535
+ },
536
+ "2": {
537
+ "name": "punctuation.definition.keyword.css"
538
+ }
539
+ },
540
+ "contentName": "variable.parameter.font-name.css",
541
+ "end": "(?=\\s*[@{;])",
542
+ "name": "meta.at-rule.font-features.css",
543
+ "patterns": [
544
+ {
545
+ "include": "#comment-block"
546
+ },
547
+ {
548
+ "include": "#escapes"
549
+ }
550
+ ]
551
+ },
552
+ {
553
+ "include": "#font-features"
554
+ },
555
+ {
556
+ "begin": "(?i)((@)namespace)(?=[\\s'\";]|/\\*|$)",
557
+ "beginCaptures": {
558
+ "1": {
559
+ "name": "keyword.control.at-rule.namespace.css"
560
+ },
561
+ "2": {
562
+ "name": "punctuation.definition.keyword.css"
563
+ }
564
+ },
565
+ "end": ";|(?=[@{])",
566
+ "endCaptures": {
567
+ "0": {
568
+ "name": "punctuation.terminator.rule.css"
569
+ }
570
+ },
571
+ "name": "meta.at-rule.namespace.css",
572
+ "patterns": [
573
+ {
574
+ "include": "#url"
575
+ },
576
+ {
577
+ "captures": {
578
+ "1": {
579
+ "patterns": [
580
+ {
581
+ "include": "#comment-block"
582
+ }
583
+ ]
584
+ },
585
+ "2": {
586
+ "name": "entity.name.function.namespace-prefix.css",
587
+ "patterns": [
588
+ {
589
+ "include": "#escapes"
590
+ }
591
+ ]
592
+ }
593
+ },
594
+ "match": "(?xi)\n(?:\\G|^|(?<=\\s))\n(?=\n (?<=\\s|^) # Starts with whitespace\n (?:[-a-zA-Z_]|[^\\x00-\\x7F]) # Then a valid identifier character\n |\n \\s* # Possible adjoining whitespace\n /\\*(?:[^*]|\\*[^/])*\\*/ # Injected comment\n)\n(.*?) # Grouped to embed #comment-block\n(\n (?:[-a-zA-Z_] | [^\\x00-\\x7F]) # First letter\n (?:[-a-zA-Z0-9_] | [^\\x00-\\x7F] # Remainder of identifier\n |\\\\(?:[0-9a-fA-F]{1,6}|.)\n )*\n)"
595
+ },
596
+ {
597
+ "include": "#comment-block"
598
+ },
599
+ {
600
+ "include": "#escapes"
601
+ },
602
+ {
603
+ "include": "#string"
604
+ }
605
+ ]
606
+ }
607
+ ]
608
+ },
609
+ "color-keywords": {
610
+ "patterns": [
611
+ {
612
+ "match": "(?i)(?<![\\w-])(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)(?![\\w-])",
613
+ "name": "support.constant.color.w3c-standard-color-name.css"
614
+ },
615
+ {
616
+ "match": "(?xi) (?<![\\w-])\n(aliceblue|antiquewhite|aquamarine|azure|beige|bisque|blanchedalmond|blueviolet|brown|burlywood\n|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan\n|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange\n|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise\n|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen\n|gainsboro|ghostwhite|gold|goldenrod|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki\n|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow\n|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray\n|lightslategrey|lightsteelblue|lightyellow|limegreen|linen|magenta|mediumaquamarine|mediumblue\n|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise\n|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|oldlace|olivedrab|orangered\n|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum\n|powderblue|rebeccapurple|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell\n|sienna|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|thistle|tomato\n|transparent|turquoise|violet|wheat|whitesmoke|yellowgreen)\n(?![\\w-])",
617
+ "name": "support.constant.color.w3c-extended-color-name.css"
618
+ },
619
+ {
620
+ "match": "(?i)(?<![\\w-])currentColor(?![\\w-])",
621
+ "name": "support.constant.color.current.css"
622
+ },
623
+ {
624
+ "match": "(?xi) (?<![\\w-])\n(ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow\n|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption\n|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow\n|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText)\n(?![\\w-])",
625
+ "name": "invalid.deprecated.color.system.css"
626
+ }
627
+ ]
14
628
  },
15
- {
16
- "begin": "\\s*((@)charset\\b)\\s*",
17
- "captures": {
18
- "1": {
19
- "name": "keyword.control.at-rule.charset.css"
629
+ "combinators": {
630
+ "patterns": [
631
+ {
632
+ "match": "/deep/|>>>",
633
+ "name": "invalid.deprecated.combinator.css"
20
634
  },
21
- "2": {
22
- "name": "punctuation.definition.keyword.css"
635
+ {
636
+ "match": ">>|>|\\+|~",
637
+ "name": "keyword.operator.combinator.css"
638
+ }
639
+ ]
640
+ },
641
+ "commas": {
642
+ "match": ",",
643
+ "name": "punctuation.separator.list.comma.css"
644
+ },
645
+ "comment-block": {
646
+ "begin": "/\\*",
647
+ "beginCaptures": {
648
+ "0": {
649
+ "name": "punctuation.definition.comment.begin.css"
650
+ }
651
+ },
652
+ "end": "\\*/",
653
+ "endCaptures": {
654
+ "0": {
655
+ "name": "punctuation.definition.comment.end.css"
23
656
  }
24
657
  },
25
- "end": "\\s*((?=;|$))",
26
- "name": "meta.at-rule.charset.css",
658
+ "name": "comment.block.css"
659
+ },
660
+ "escapes": {
27
661
  "patterns": [
28
662
  {
29
- "include": "#string-double"
663
+ "match": "\\\\[0-9a-fA-F]{1,6}",
664
+ "name": "constant.character.escape.codepoint.css"
665
+ },
666
+ {
667
+ "match": "\\\\$\\n?",
668
+ "name": "constant.character.escape.newline.css"
30
669
  },
31
670
  {
32
- "include": "#string-single"
671
+ "match": "\\\\.",
672
+ "name": "constant.character.escape.css"
33
673
  }
34
674
  ]
35
675
  },
36
- {
37
- "begin": "\\s*((@)import\\b)\\s*",
38
- "captures": {
676
+ "feature-query": {
677
+ "begin": "\\(",
678
+ "beginCaptures": {
679
+ "0": {
680
+ "name": "punctuation.definition.condition.begin.bracket.round.css"
681
+ }
682
+ },
683
+ "end": "\\)",
684
+ "endCaptures": {
685
+ "0": {
686
+ "name": "punctuation.definition.condition.end.bracket.round.css"
687
+ }
688
+ },
689
+ "name": "meta.feature-query.css",
690
+ "patterns": [
691
+ {
692
+ "include": "#feature-query-operators"
693
+ },
694
+ {
695
+ "include": "#feature-query"
696
+ }
697
+ ]
698
+ },
699
+ "feature-query-operators": {
700
+ "patterns": [
701
+ {
702
+ "match": "(?i)(?<=[\\s()]|^|\\*/)(and|not|or)(?=[\\s()]|/\\*|$)",
703
+ "name": "keyword.operator.logical.feature.$1.css"
704
+ },
705
+ {
706
+ "include": "#rule-list-innards"
707
+ }
708
+ ]
709
+ },
710
+ "font-features": {
711
+ "begin": "(?xi)\n((@)(annotation|character-variant|ornaments|styleset|stylistic|swash))\n(?=[\\s@'\"{;]|/\\*|$)",
712
+ "beginCaptures": {
39
713
  "1": {
40
- "name": "keyword.control.at-rule.import.css"
714
+ "name": "keyword.control.at-rule.${3:/downcase}.css"
41
715
  },
42
716
  "2": {
43
717
  "name": "punctuation.definition.keyword.css"
44
718
  }
45
719
  },
46
- "end": "\\s*((?=;|\\}))",
47
- "name": "meta.at-rule.import.css",
720
+ "end": "(?<=})",
721
+ "name": "meta.at-rule.${3:/downcase}.css",
722
+ "patterns": [
723
+ {
724
+ "begin": "{",
725
+ "beginCaptures": {
726
+ "0": {
727
+ "name": "punctuation.section.property-list.begin.bracket.curly.css"
728
+ }
729
+ },
730
+ "end": "}",
731
+ "endCaptures": {
732
+ "0": {
733
+ "name": "punctuation.section.property-list.end.bracket.curly.css"
734
+ }
735
+ },
736
+ "name": "meta.property-list.font-feature.css",
737
+ "patterns": [
738
+ {
739
+ "captures": {
740
+ "0": {
741
+ "patterns": [
742
+ {
743
+ "include": "#escapes"
744
+ }
745
+ ]
746
+ }
747
+ },
748
+ "match": "(?x)\n(?: [-a-zA-Z_] | [^\\x00-\\x7F] ) # First letter\n(?: [-a-zA-Z0-9_] | [^\\x00-\\x7F] # Remainder of identifier\n | \\\\(?:[0-9a-fA-F]{1,6}|.)\n)*",
749
+ "name": "variable.font-feature.css"
750
+ },
751
+ {
752
+ "include": "#rule-list-innards"
753
+ }
754
+ ]
755
+ }
756
+ ]
757
+ },
758
+ "functions": {
48
759
  "patterns": [
49
760
  {
50
- "include": "#string-double"
761
+ "begin": "(?i)(?<![\\w-])(calc)(\\()",
762
+ "beginCaptures": {
763
+ "1": {
764
+ "name": "support.function.calc.css"
765
+ },
766
+ "2": {
767
+ "name": "punctuation.section.function.begin.bracket.round.css"
768
+ }
769
+ },
770
+ "end": "\\)",
771
+ "endCaptures": {
772
+ "0": {
773
+ "name": "punctuation.section.function.end.bracket.round.css"
774
+ }
775
+ },
776
+ "name": "meta.function.calc.css",
777
+ "patterns": [
778
+ {
779
+ "match": "[*/]|(?<=\\s|^)[-+](?=\\s|$)",
780
+ "name": "keyword.operator.arithmetic.css"
781
+ },
782
+ {
783
+ "include": "#property-values"
784
+ }
785
+ ]
786
+ },
787
+ {
788
+ "begin": "(?i)(?<![\\w-])(rgba?|hsla?)(\\()",
789
+ "beginCaptures": {
790
+ "1": {
791
+ "name": "support.function.misc.css"
792
+ },
793
+ "2": {
794
+ "name": "punctuation.section.function.begin.bracket.round.css"
795
+ }
796
+ },
797
+ "end": "\\)",
798
+ "endCaptures": {
799
+ "0": {
800
+ "name": "punctuation.section.function.end.bracket.round.css"
801
+ }
802
+ },
803
+ "name": "meta.function.color.css",
804
+ "patterns": [
805
+ {
806
+ "include": "#property-values"
807
+ }
808
+ ]
809
+ },
810
+ {
811
+ "begin": "(?xi) (?<![\\w-])\n(\n (?:-webkit-|-moz-|-o-)? # Accept prefixed/historical variants\n (?:repeating-)? # \"Repeating\"-type gradient\n (?:linear|radial|conic) # Shape\n -gradient\n)\n(\\()",
812
+ "beginCaptures": {
813
+ "1": {
814
+ "name": "support.function.gradient.css"
815
+ },
816
+ "2": {
817
+ "name": "punctuation.section.function.begin.bracket.round.css"
818
+ }
819
+ },
820
+ "end": "\\)",
821
+ "endCaptures": {
822
+ "0": {
823
+ "name": "punctuation.section.function.end.bracket.round.css"
824
+ }
825
+ },
826
+ "name": "meta.function.gradient.css",
827
+ "patterns": [
828
+ {
829
+ "match": "(?i)(?<![\\w-])(from|to|at)(?![\\w-])",
830
+ "name": "keyword.operator.gradient.css"
831
+ },
832
+ {
833
+ "include": "#property-values"
834
+ }
835
+ ]
836
+ },
837
+ {
838
+ "begin": "(?i)(?<![\\w-])(-webkit-gradient)(\\()",
839
+ "beginCaptures": {
840
+ "1": {
841
+ "name": "invalid.deprecated.gradient.function.css"
842
+ },
843
+ "2": {
844
+ "name": "punctuation.section.function.begin.bracket.round.css"
845
+ }
846
+ },
847
+ "end": "\\)",
848
+ "endCaptures": {
849
+ "0": {
850
+ "name": "punctuation.section.function.end.bracket.round.css"
851
+ }
852
+ },
853
+ "name": "meta.function.gradient.invalid.deprecated.gradient.css",
854
+ "patterns": [
855
+ {
856
+ "begin": "(?i)(?<![\\w-])(from|to|color-stop)(\\()",
857
+ "beginCaptures": {
858
+ "1": {
859
+ "name": "invalid.deprecated.function.css"
860
+ },
861
+ "2": {
862
+ "name": "punctuation.section.function.begin.bracket.round.css"
863
+ }
864
+ },
865
+ "end": "\\)",
866
+ "endCaptures": {
867
+ "0": {
868
+ "name": "punctuation.section.function.end.bracket.round.css"
869
+ }
870
+ },
871
+ "patterns": [
872
+ {
873
+ "include": "#property-values"
874
+ }
875
+ ]
876
+ },
877
+ {
878
+ "include": "#property-values"
879
+ }
880
+ ]
881
+ },
882
+ {
883
+ "begin": "(?xi) (?<![\\w-])\n(annotation|attr|blur|brightness|character-variant|contrast|counters?\n|cross-fade|drop-shadow|element|fit-content|format|grayscale|hue-rotate\n|image-set|invert|local|minmax|opacity|ornaments|repeat|saturate|sepia\n|styleset|stylistic|swash|symbols)\n(\\()",
884
+ "beginCaptures": {
885
+ "1": {
886
+ "name": "support.function.misc.css"
887
+ },
888
+ "2": {
889
+ "name": "punctuation.section.function.begin.bracket.round.css"
890
+ }
891
+ },
892
+ "end": "\\)",
893
+ "endCaptures": {
894
+ "0": {
895
+ "name": "punctuation.section.function.end.bracket.round.css"
896
+ }
897
+ },
898
+ "name": "meta.function.misc.css",
899
+ "patterns": [
900
+ {
901
+ "match": "(?i)(?<=[,\\s\"]|\\*/|^)\\d+x(?=[\\s,\"')]|/\\*|$)",
902
+ "name": "constant.numeric.other.density.css"
903
+ },
904
+ {
905
+ "include": "#property-values"
906
+ },
907
+ {
908
+ "match": "[^'\"),\\s]+",
909
+ "name": "variable.parameter.misc.css"
910
+ }
911
+ ]
51
912
  },
52
913
  {
53
- "include": "#string-single"
914
+ "begin": "(?i)(?<![\\w-])(circle|ellipse|inset|polygon|rect)(\\()",
915
+ "beginCaptures": {
916
+ "1": {
917
+ "name": "support.function.shape.css"
918
+ },
919
+ "2": {
920
+ "name": "punctuation.section.function.begin.bracket.round.css"
921
+ }
922
+ },
923
+ "end": "\\)",
924
+ "endCaptures": {
925
+ "0": {
926
+ "name": "punctuation.section.function.end.bracket.round.css"
927
+ }
928
+ },
929
+ "name": "meta.function.shape.css",
930
+ "patterns": [
931
+ {
932
+ "match": "(?i)(?<=\\s|^|\\*/)(at|round)(?=\\s|/\\*|$)",
933
+ "name": "keyword.operator.shape.css"
934
+ },
935
+ {
936
+ "include": "#property-values"
937
+ }
938
+ ]
54
939
  },
55
940
  {
56
- "begin": "\\s*(url)\\s*(\\()\\s*",
941
+ "begin": "(?i)(?<![\\w-])(cubic-bezier|steps)(\\()",
57
942
  "beginCaptures": {
58
943
  "1": {
59
- "name": "support.function.url.css"
944
+ "name": "support.function.timing-function.css"
60
945
  },
61
946
  "2": {
62
- "name": "punctuation.section.function.css"
947
+ "name": "punctuation.section.function.begin.bracket.round.css"
63
948
  }
64
949
  },
65
- "end": "\\s*(\\))\\s*",
950
+ "end": "\\)",
66
951
  "endCaptures": {
67
- "1": {
68
- "name": "punctuation.section.function.css"
952
+ "0": {
953
+ "name": "punctuation.section.function.end.bracket.round.css"
69
954
  }
70
955
  },
956
+ "name": "meta.function.timing-function.css",
71
957
  "patterns": [
72
958
  {
73
- "match": "[^'\") \\t]+",
74
- "name": "variable.parameter.url.css"
959
+ "match": "(?i)(?<![\\w-])(start|end)(?=\\s*\\)|$)",
960
+ "name": "support.constant.step-direction.css"
75
961
  },
76
962
  {
77
- "include": "#string-single"
963
+ "include": "#property-values"
964
+ }
965
+ ]
966
+ },
967
+ {
968
+ "begin": "(?xi) (?<![\\w-])\n( (?:translate|scale|rotate)(?:[XYZ]|3D)?\n| matrix(?:3D)?\n| skew[XY]?\n| perspective\n)\n(\\()",
969
+ "beginCaptures": {
970
+ "1": {
971
+ "name": "support.function.transform.css"
78
972
  },
973
+ "2": {
974
+ "name": "punctuation.section.function.begin.bracket.round.css"
975
+ }
976
+ },
977
+ "end": "\\)",
978
+ "endCaptures": {
979
+ "0": {
980
+ "name": "punctuation.section.function.end.bracket.round.css"
981
+ }
982
+ },
983
+ "patterns": [
79
984
  {
80
- "include": "#string-double"
985
+ "include": "#property-values"
81
986
  }
82
987
  ]
83
988
  },
84
989
  {
85
- "include": "#media-query-list"
86
- }
87
- ]
88
- },
89
- {
90
- "begin": "^\\s*((@)font-face)\\s*(?=\\{)",
91
- "beginCaptures": {
92
- "1": {
93
- "name": "keyword.control.at-rule.font-face.css"
990
+ "include": "#url"
94
991
  },
95
- "2": {
96
- "name": "punctuation.definition.keyword.css"
97
- }
98
- },
99
- "end": "(?!\\G)",
100
- "name": "meta.at-rule.font-face.css",
101
- "patterns": [
102
992
  {
103
- "include": "#rule-list"
993
+ "begin": "(?i)(?<![\\w-])(var)(\\()",
994
+ "beginCaptures": {
995
+ "1": {
996
+ "name": "support.function.misc.css"
997
+ },
998
+ "2": {
999
+ "name": "punctuation.section.function.begin.bracket.round.css"
1000
+ }
1001
+ },
1002
+ "end": "\\)",
1003
+ "endCaptures": {
1004
+ "0": {
1005
+ "name": "punctuation.section.function.end.bracket.round.css"
1006
+ }
1007
+ },
1008
+ "name": "meta.function.variable.css",
1009
+ "patterns": [
1010
+ {
1011
+ "name": "variable.argument.css",
1012
+ "match": "(?x)\n--\n(?:[-a-zA-Z_] | [^\\x00-\\x7F]) # First letter\n(?:[-a-zA-Z0-9_] | [^\\x00-\\x7F] # Remainder of identifier\n |\\\\(?:[0-9a-fA-F]{1,6}|.)\n)*"
1013
+ },
1014
+ {
1015
+ "include": "#property-values"
1016
+ }
1017
+ ]
104
1018
  }
105
1019
  ]
106
1020
  },
107
- {
108
- "begin": "(?=^\\s*@media\\s*.*?\\{)",
109
- "end": "\\s*(\\})",
110
- "endCaptures": {
111
- "1": {
112
- "name": "punctuation.section.property-list.end.css"
113
- }
114
- },
1021
+ "functional-pseudo-classes": {
115
1022
  "patterns": [
116
1023
  {
117
- "begin": "^\\s*((@)media)(?=.*?\\{)",
1024
+ "begin": "(?i)((:)dir)(\\()",
118
1025
  "beginCaptures": {
119
1026
  "1": {
120
- "name": "keyword.control.at-rule.media.css"
1027
+ "name": "entity.other.attribute-name.pseudo-class.css"
121
1028
  },
122
1029
  "2": {
123
- "name": "punctuation.definition.keyword.css"
1030
+ "name": "punctuation.definition.entity.css"
124
1031
  },
125
1032
  "3": {
126
- "name": "support.constant.media.css"
1033
+ "name": "punctuation.section.function.begin.bracket.round.css"
1034
+ }
1035
+ },
1036
+ "end": "\\)",
1037
+ "endCaptures": {
1038
+ "0": {
1039
+ "name": "punctuation.section.function.end.bracket.round.css"
127
1040
  }
128
1041
  },
129
- "end": "\\s*(?=\\{)",
130
- "name": "meta.at-rule.media.css",
131
1042
  "patterns": [
132
1043
  {
133
- "include": "#media-query-list"
1044
+ "include": "#comment-block"
1045
+ },
1046
+ {
1047
+ "include": "#escapes"
1048
+ },
1049
+ {
1050
+ "match": "(?i)(?<![\\w-])(ltr|rtl)(?![\\w-])",
1051
+ "name": "support.constant.text-direction.css"
1052
+ },
1053
+ {
1054
+ "include": "#property-value"
134
1055
  }
135
1056
  ]
136
1057
  },
137
1058
  {
138
- "begin": "\\s*(\\{)",
1059
+ "begin": "(?i)((:)lang)(\\()",
139
1060
  "beginCaptures": {
140
1061
  "1": {
141
- "name": "punctuation.section.property-list.begin.css"
1062
+ "name": "entity.other.attribute-name.pseudo-class.css"
1063
+ },
1064
+ "2": {
1065
+ "name": "punctuation.definition.entity.css"
1066
+ },
1067
+ "3": {
1068
+ "name": "punctuation.section.function.begin.bracket.round.css"
1069
+ }
1070
+ },
1071
+ "end": "\\)",
1072
+ "endCaptures": {
1073
+ "0": {
1074
+ "name": "punctuation.section.function.end.bracket.round.css"
142
1075
  }
143
1076
  },
144
- "end": "(?=\\})",
145
1077
  "patterns": [
146
1078
  {
147
- "include": "$self"
1079
+ "match": "(?<=[(,\\s])[a-zA-Z]+(-[a-zA-Z0-9]*|\\\\(?:[0-9a-fA-F]{1,6}|.))*(?=[),\\s])",
1080
+ "name": "support.constant.language-range.css"
1081
+ },
1082
+ {
1083
+ "begin": "\"",
1084
+ "beginCaptures": {
1085
+ "0": {
1086
+ "name": "punctuation.definition.string.begin.css"
1087
+ }
1088
+ },
1089
+ "end": "\"",
1090
+ "endCaptures": {
1091
+ "0": {
1092
+ "name": "punctuation.definition.string.end.css"
1093
+ }
1094
+ },
1095
+ "name": "string.quoted.double.css",
1096
+ "patterns": [
1097
+ {
1098
+ "include": "#escapes"
1099
+ },
1100
+ {
1101
+ "match": "(?<=[\"\\s])[a-zA-Z*]+(-[a-zA-Z0-9*]*)*(?=[\"\\s])",
1102
+ "name": "support.constant.language-range.css"
1103
+ }
1104
+ ]
1105
+ },
1106
+ {
1107
+ "begin": "'",
1108
+ "beginCaptures": {
1109
+ "0": {
1110
+ "name": "punctuation.definition.string.begin.css"
1111
+ }
1112
+ },
1113
+ "end": "'",
1114
+ "endCaptures": {
1115
+ "0": {
1116
+ "name": "punctuation.definition.string.end.css"
1117
+ }
1118
+ },
1119
+ "name": "string.quoted.single.css",
1120
+ "patterns": [
1121
+ {
1122
+ "include": "#escapes"
1123
+ },
1124
+ {
1125
+ "match": "(?<=['\\s])[a-zA-Z*]+(-[a-zA-Z0-9*]*)*(?=['\\s])",
1126
+ "name": "support.constant.language-range.css"
1127
+ }
1128
+ ]
1129
+ },
1130
+ {
1131
+ "include": "#commas"
148
1132
  }
149
1133
  ]
150
- }
151
- ]
152
- },
153
- {
154
- "begin": "(?=\\{)",
155
- "end": "(?!\\G)",
156
- "patterns": [
157
- {
158
- "include": "#rule-list"
159
- }
160
- ]
161
- }
162
- ],
163
- "repository": {
164
- "color-values": {
165
- "patterns": [
166
- {
167
- "comment": "http://www.w3.org/TR/CSS21/syndata.html#value-def-color",
168
- "match": "\\b(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)\\b",
169
- "name": "support.constant.color.w3c-standard-color-name.css"
170
1134
  },
171
1135
  {
172
- "comment": "These colours are mostly recognised but will not validate. ref: http://www.w3schools.com/css/css_colornames.asp",
173
- "match": "\\b(aliceblue|antiquewhite|aquamarine|azure|beige|bisque|blanchedalmond|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|gainsboro|ghostwhite|gold|goldenrod|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|limegreen|linen|magenta|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|oldlace|olivedrab|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|thistle|tomato|turquoise|violet|wheat|whitesmoke|yellowgreen)\\b",
174
- "name": "invalid.deprecated.color.w3c-non-standard-color-name.css"
175
- },
176
- {
177
- "begin": "(hsla?|rgba?)\\s*(\\()",
1136
+ "begin": "(?i)((:)(?:not|has|matches))(\\()",
178
1137
  "beginCaptures": {
179
1138
  "1": {
180
- "name": "support.function.misc.css"
1139
+ "name": "entity.other.attribute-name.pseudo-class.css"
181
1140
  },
182
1141
  "2": {
183
- "name": "punctuation.section.function.css"
1142
+ "name": "punctuation.definition.entity.css"
1143
+ },
1144
+ "3": {
1145
+ "name": "punctuation.section.function.begin.bracket.round.css"
184
1146
  }
185
1147
  },
186
- "end": "(\\))",
1148
+ "end": "\\)",
187
1149
  "endCaptures": {
188
- "1": {
189
- "name": "punctuation.section.function.css"
1150
+ "0": {
1151
+ "name": "punctuation.section.function.end.bracket.round.css"
190
1152
  }
191
1153
  },
192
1154
  "patterns": [
193
1155
  {
194
- "match": "(?x)\\b\n\t\t\t\t\t\t\t (0*((1?[0-9]{1,2})|(2([0-4][0-9]|5[0-5])))\\s*,\\s*){2}\n\t\t\t\t\t\t\t (0*((1?[0-9]{1,2})|(2([0-4][0-9]|5[0-5])))\\b)\n\t\t\t\t\t\t\t (\\s*,\\s*((0?\\.[0-9]+)|[0-1]))?\n\t\t\t\t\t\t\t",
195
- "name": "constant.other.color.rgb-value.css"
1156
+ "include": "#selector-innards"
1157
+ }
1158
+ ]
1159
+ },
1160
+ {
1161
+ "begin": "(?i)((:)nth-(?:last-)?(?:child|of-type))(\\()",
1162
+ "beginCaptures": {
1163
+ "1": {
1164
+ "name": "entity.other.attribute-name.pseudo-class.css"
1165
+ },
1166
+ "2": {
1167
+ "name": "punctuation.definition.entity.css"
196
1168
  },
1169
+ "3": {
1170
+ "name": "punctuation.section.function.begin.bracket.round.css"
1171
+ }
1172
+ },
1173
+ "end": "\\)",
1174
+ "endCaptures": {
1175
+ "0": {
1176
+ "name": "punctuation.section.function.end.bracket.round.css"
1177
+ }
1178
+ },
1179
+ "patterns": [
197
1180
  {
198
- "match": "\\b([0-9]{1,2}|100)\\s*%,\\s*([0-9]{1,2}|100)\\s*%,\\s*([0-9]{1,2}|100)\\s*%",
199
- "name": "constant.other.color.rgb-percentage.css"
1181
+ "match": "(?i)[+-]?(\\d+n?|n)(\\s*[+-]\\s*\\d+)?",
1182
+ "name": "constant.numeric.css"
200
1183
  },
201
1184
  {
202
- "include": "#numeric-values"
1185
+ "match": "(?i)even|odd",
1186
+ "name": "support.constant.parity.css"
203
1187
  }
204
1188
  ]
205
1189
  }
206
1190
  ]
207
1191
  },
208
- "comment-block": {
209
- "begin": "/\\*",
1192
+ "media-features": {
210
1193
  "captures": {
211
- "0": {
212
- "name": "punctuation.definition.comment.css"
213
- }
214
- },
215
- "end": "\\*/",
216
- "name": "comment.block.css"
217
- },
218
- "media-query": {
219
- "begin": "(?i)\\s*(only|not)?\\s*(all|aural|braille|embossed|handheld|print|projection|screen|tty|tv)?",
220
- "beginCaptures": {
221
1194
  "1": {
222
- "name": "keyword.operator.logic.media.css"
1195
+ "name": "support.type.property-name.media.css"
223
1196
  },
224
1197
  "2": {
225
- "name": "support.constant.media.css"
226
- }
227
- },
228
- "end": "\\s*(?:(,)|(?=[{;]))",
229
- "endCaptures": {
230
- "1": {
231
- "name": "punctuation.definition.arbitrary-repitition.css"
1198
+ "name": "invalid.deprecated.media.css"
1199
+ },
1200
+ "3": {
1201
+ "name": "support.type.vendored.property-name.media.css"
232
1202
  }
233
1203
  },
1204
+ "match": "(?xi)\n(?<=^|\\s|\\(|\\*/) # Preceded by whitespace, bracket or comment\n(?:\n # Standardised features\n (\n (?:min-|max-)? # Range features\n (?: height\n | width\n | aspect-ratio\n | color\n | color-index\n | monochrome\n | resolution\n )\n | grid # Discrete features\n | scan\n | orientation\n | display-mode\n )\n |\n # Deprecated features\n (\n (?:min-|max-)? # Deprecated in Media Queries 4\n device-\n (?: height\n | width\n | aspect-ratio\n )\n )\n |\n # Vendor extensions\n (\n (?:\n # Spec-compliant syntax\n [-_]\n (?: webkit # Webkit/Blink\n | apple|khtml # Webkit aliases\n | epub # ePub3\n | moz # Gecko\n | ms # Microsoft\n | o # Presto (pre-Opera 15)\n | xv|ah|rim|atsc| # Less common vendors\n hp|tc|wap|ro\n )\n |\n # Non-standard prefixes\n (?: mso # Microsoft Office\n | prince # YesLogic\n )\n )\n -\n [\\w-]+ # Feature name\n (?= # Terminates correctly\n \\s* # Possible whitespace\n (?: # Possible injected comment\n /\\*\n (?:[^*]|\\*[^/])*\n \\*/\n )?\n \\s*\n [:)] # Ends with a colon or closed bracket\n )\n )\n)\n(?=\\s|$|[><:=]|\\)|/\\*) # Terminates cleanly"
1205
+ },
1206
+ "media-feature-keywords": {
1207
+ "match": "(?xi)\n(?<=^|\\s|:|\\*/)\n(?: portrait # Orientation\n | landscape\n | progressive # Scan types\n | interlace\n | fullscreen # Display modes\n | standalone\n | minimal-ui\n | browser\n)\n(?=\\s|\\)|$)",
1208
+ "name": "support.constant.property-value.css"
1209
+ },
1210
+ "media-query": {
1211
+ "begin": "\\G",
1212
+ "end": "(?=\\s*[{;])",
234
1213
  "patterns": [
235
1214
  {
236
- "begin": "\\s*(and)?\\s*(\\()\\s*",
1215
+ "include": "#comment-block"
1216
+ },
1217
+ {
1218
+ "include": "#escapes"
1219
+ },
1220
+ {
1221
+ "include": "#media-types"
1222
+ },
1223
+ {
1224
+ "match": "(?i)(?<=\\s|^|,|\\*/)(only|not)(?=\\s|{|/\\*|$)",
1225
+ "name": "keyword.operator.logical.$1.media.css"
1226
+ },
1227
+ {
1228
+ "match": "(?i)(?<=\\s|^|\\*/|\\))and(?=\\s|/\\*|$)",
1229
+ "name": "keyword.operator.logical.and.media.css"
1230
+ },
1231
+ {
1232
+ "match": ",(?:(?:\\s*,)+|(?=\\s*[;){]))",
1233
+ "name": "invalid.illegal.comma.css"
1234
+ },
1235
+ {
1236
+ "include": "#commas"
1237
+ },
1238
+ {
1239
+ "begin": "\\(",
237
1240
  "beginCaptures": {
238
- "1": {
239
- "name": "keyword.operator.logic.media.css"
1241
+ "0": {
1242
+ "name": "punctuation.definition.parameters.begin.bracket.round.css"
240
1243
  }
241
1244
  },
242
1245
  "end": "\\)",
1246
+ "endCaptures": {
1247
+ "0": {
1248
+ "name": "punctuation.definition.parameters.end.bracket.round.css"
1249
+ }
1250
+ },
243
1251
  "patterns": [
244
1252
  {
245
- "begin": "(?x)\n\t (\n\t ((min|max)-)?\n\t (\n\t ((device-)?(height|width|aspect-ratio))|\n\t (color(-index)?)|monochrome|resolution\n\t )\n\t )|grid|scan|orientation\n\t \\s*(?=[:)])",
246
- "beginCaptures": {
247
- "0": {
248
- "name": "support.type.property-name.media.css"
249
- }
250
- },
251
- "end": "(:)|(?=\\))",
252
- "endCaptures": {
253
- "1": {
254
- "name": "punctuation.separator.key-value.css"
255
- }
256
- }
1253
+ "include": "#media-features"
1254
+ },
1255
+ {
1256
+ "include": "#media-feature-keywords"
257
1257
  },
258
1258
  {
259
- "match": "\\b(portrait|landscape|progressive|interlace)",
260
- "name": "support.constant.property-value.css"
1259
+ "match": ":",
1260
+ "name": "punctuation.separator.key-value.css"
1261
+ },
1262
+ {
1263
+ "match": ">=|<=|=|<|>",
1264
+ "name": "keyword.operator.comparison.css"
261
1265
  },
262
1266
  {
263
1267
  "captures": {
@@ -271,151 +1275,197 @@
271
1275
  "name": "constant.numeric.css"
272
1276
  }
273
1277
  },
274
- "match": "\\s*(\\d+)(/)(\\d+)"
1278
+ "match": "(\\d+)\\s*(/)\\s*(\\d+)",
1279
+ "name": "meta.ratio.css"
275
1280
  },
276
1281
  {
277
1282
  "include": "#numeric-values"
1283
+ },
1284
+ {
1285
+ "include": "#comment-block"
278
1286
  }
279
1287
  ]
280
1288
  }
281
1289
  ]
282
1290
  },
283
1291
  "media-query-list": {
284
- "begin": "\\s*(?=[^{;])",
285
- "end": "\\s*(?=[{;])",
1292
+ "begin": "(?=\\s*[^{;])",
1293
+ "end": "(?=\\s*[{;])",
1294
+ "patterns": [
1295
+ {
1296
+ "include": "#media-query"
1297
+ }
1298
+ ]
1299
+ },
1300
+ "media-types": {
1301
+ "captures": {
1302
+ "1": {
1303
+ "name": "support.constant.media.css"
1304
+ },
1305
+ "2": {
1306
+ "name": "invalid.deprecated.constant.media.css"
1307
+ }
1308
+ },
1309
+ "match": "(?xi)\n(?<=^|\\s|,|\\*/)\n(?:\n # Valid media types\n (all|print|screen|speech)\n |\n # Deprecated in Media Queries 4: http://dev.w3.org/csswg/mediaqueries/#media-types\n (aural|braille|embossed|handheld|projection|tty|tv)\n)\n(?=$|[{,\\s;]|/\\*)"
1310
+ },
1311
+ "numeric-values": {
1312
+ "patterns": [
1313
+ {
1314
+ "captures": {
1315
+ "1": {
1316
+ "name": "punctuation.definition.constant.css"
1317
+ }
1318
+ },
1319
+ "match": "(#)(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})\\b",
1320
+ "name": "constant.other.color.rgb-value.hex.css"
1321
+ },
1322
+ {
1323
+ "captures": {
1324
+ "1": {
1325
+ "name": "keyword.other.unit.percentage.css"
1326
+ },
1327
+ "2": {
1328
+ "name": "keyword.other.unit.${2:/downcase}.css"
1329
+ }
1330
+ },
1331
+ "match": "(?xi) (?<![\\w-])\n[-+]? # Sign indicator\n\n(?: # Numerals\n [0-9]+ (?:\\.[0-9]+)? # Integer/float with leading digits\n | \\.[0-9]+ # Float without leading digits\n)\n\n(?: # Scientific notation\n (?<=[0-9]) # Exponent must follow a digit\n E # Exponent indicator\n [-+]? # Possible sign indicator\n [0-9]+ # Exponent value\n)?\n\n(?: # Possible unit for data-type:\n (%) # - Percentage\n | ( deg|grad|rad|turn # - Angle\n | Hz|kHz # - Frequency\n | ch|cm|em|ex|in|mm|mozmm|pc| # - Length\n pt|px|q|rem|vh|vmax|vmin|vw\n | dpi|dpcm|dppx # - Resolution\n | s|ms # - Time\n )\n \\b # Boundary checking intentionally lax to\n)? # facilitate embedding in CSS-like grammars",
1332
+ "name": "constant.numeric.css"
1333
+ }
1334
+ ]
1335
+ },
1336
+ "property-keywords": {
286
1337
  "patterns": [
287
1338
  {
288
- "include": "#media-query"
1339
+ "match": "(?xi) (?<![\\w-])\n(above|absolute|active|add|additive|after-edge|alias|all|all-petite-caps|all-scroll|all-small-caps|alpha|alphabetic|alternate|alternate-reverse\n|always|antialiased|auto|auto-pos|available|avoid|avoid-column|avoid-page|avoid-region|backwards|balance|baseline|before-edge|below|bevel\n|bidi-override|blink|block|block-axis|block-start|block-end|bold|bolder|border|border-box|both|bottom|bottom-outside|break-all|break-word|bullets\n|butt|capitalize|caption|cell|center|central|char|circle|clip|clone|close-quote|closest-corner|closest-side|col-resize|collapse|color|color-burn\n|color-dodge|column|column-reverse|common-ligatures|compact|condensed|contain|content|content-box|contents|context-menu|contextual|copy|cover\n|crisp-edges|crispEdges|crosshair|cyclic|darken|dashed|decimal|default|dense|diagonal-fractions|difference|digits|disabled|disc|discretionary-ligatures\n|distribute|distribute-all-lines|distribute-letter|distribute-space|dot|dotted|double|double-circle|e-resize|each-line|ease|ease-in\n|ease-in-out|ease-out|economy|ellipse|ellipsis|embed|end|evenodd|ew-resize|exact|exclude|exclusion|expanded|extends|extra-condensed|extra-expanded\n|farthest-corner|farthest-side|fill|fill-available|fill-box|filled|fit-content|fixed|flat|flex|flex-end|flex-start|flip|forwards|freeze\n|from-image|full-width|geometricPrecision|georgian|grab|grabbing|grayscale|grid|groove|hand|hanging|hard-light|help|hidden|hide\n|historical-forms|historical-ligatures|horizontal|horizontal-tb|hue|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space\n|ideographic|inactive|infinite|inherit|initial|inline|inline-axis|inline-block|inline-end|inline-flex|inline-grid|inline-list-item|inline-start\n|inline-table|inset|inside|inter-character|inter-ideograph|inter-word|intersect|invert|isolate|isolate-override|italic|jis04|jis78|jis83\n|jis90|justify|justify-all|kannada|keep-all|landscape|large|larger|left|lighten|lighter|line|line-edge|line-through|linear|linearRGB\n|lining-nums|list-item|local|loose|lowercase|lr|lr-tb|ltr|luminance|luminosity|main-size|mandatory|manipulation|manual|margin-box|match-parent\n|match-source|mathematical|max-content|medium|menu|message-box|middle|min-content|miter|mixed|move|multiply|n-resize|narrower|ne-resize\n|nearest-neighbor|nesw-resize|newspaper|no-change|no-clip|no-close-quote|no-common-ligatures|no-contextual|no-discretionary-ligatures\n|no-drop|no-historical-ligatures|no-open-quote|no-repeat|none|nonzero|normal|not-allowed|nowrap|ns-resize|numbers|numeric|nw-resize|nwse-resize\n|oblique|oldstyle-nums|open|open-quote|optimizeLegibility|optimizeQuality|optimizeSpeed|ordinal|outset|outside|over|overlay|overline|padding\n|padding-box|page|painted|pan-down|pan-left|pan-right|pan-up|pan-x|pan-y|paused|petite-caps|pixelated|plaintext|pointer|portrait|pre|pre-line\n|pre-wrap|preserve-3d|progress|progressive|proportional-nums|proportional-width|proximity|radial|recto|region|relative|remove|repeat|repeat-[xy]\n|reset-size|reverse|revert|ridge|right|rl|rl-tb|round|row|row-resize|row-reverse|row-severse|rtl|ruby|ruby-base|ruby-base-container|ruby-text\n|ruby-text-container|run-in|running|s-resize|saturation|scale-down|screen|scroll|scroll-position|se-resize|semi-condensed|semi-expanded|separate\n|sesame|show|sideways|sideways-left|sideways-lr|sideways-right|sideways-rl|simplified|slashed-zero|slice|small|small-caps|small-caption|smaller\n|smooth|soft-light|solid|space|space-around|space-between|spell-out|square|sRGB|stacked-fractions|start|static|status-bar|step-end|step-start\n|sticky|stretch|strict|stroke|stroke-box|style|sub|subgrid|subpixel-antialiased|subtract|super|sw-resize|symbolic|table|table-caption|table-cell\n|table-column|table-column-group|table-footer-group|table-header-group|table-row|table-row-group|tabular-nums|tb|tb-rl|text|text-after-edge\n|text-before-edge|text-bottom|text-top|thick|thin|titling-caps|top|top-outside|touch|traditional|transparent|triangle|ultra-condensed|ultra-expanded\n|under|underline|unicase|unset|uppercase|upright|use-glyph-orientation|use-script|verso|vertical|vertical-ideographic|vertical-lr|vertical-rl\n|vertical-text|view-box|visible|visibleFill|visiblePainted|visibleStroke|w-resize|wait|wavy|weight|whitespace|wider|words|wrap|wrap-reverse\n|x-large|x-small|xx-large|xx-small|zero|zoom-in|zoom-out)\n(?![\\w-])",
1340
+ "name": "support.constant.property-value.css"
1341
+ },
1342
+ {
1343
+ "match": "(?xi) (?<![\\w-])\n(arabic-indic|armenian|bengali|cambodian|circle|cjk-decimal|cjk-earthly-branch|cjk-heavenly-stem|cjk-ideographic\n|decimal|decimal-leading-zero|devanagari|disc|disclosure-closed|disclosure-open|ethiopic-halehame-am\n|ethiopic-halehame-ti-e[rt]|ethiopic-numeric|georgian|gujarati|gurmukhi|hangul|hangul-consonant|hebrew\n|hiragana|hiragana-iroha|japanese-formal|japanese-informal|kannada|katakana|katakana-iroha|khmer\n|korean-hangul-formal|korean-hanja-formal|korean-hanja-informal|lao|lower-alpha|lower-armenian|lower-greek\n|lower-latin|lower-roman|malayalam|mongolian|myanmar|oriya|persian|simp-chinese-formal|simp-chinese-informal\n|square|tamil|telugu|thai|tibetan|trad-chinese-formal|trad-chinese-informal|upper-alpha|upper-armenian\n|upper-latin|upper-roman|urdu)\n(?![\\w-])",
1344
+ "name": "support.constant.property-value.list-style-type.css"
1345
+ },
1346
+ {
1347
+ "match": "(?<![\\w-])(?i:-(?:ah|apple|atsc|epub|hp|khtml|moz|ms|o|rim|ro|tc|wap|webkit|xv)|(?:mso|prince))-[a-zA-Z-]+",
1348
+ "name": "support.constant.vendored.property-value.css"
1349
+ },
1350
+ {
1351
+ "match": "(?<![\\w-])(?i:arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace)(?![\\w-])",
1352
+ "name": "support.constant.font-name.css"
289
1353
  }
290
1354
  ]
291
1355
  },
292
- "numeric-values": {
1356
+ "property-names": {
293
1357
  "patterns": [
294
1358
  {
295
- "captures": {
296
- "1": {
297
- "name": "punctuation.definition.constant.css"
298
- }
299
- },
300
- "match": "(#)([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\\b",
301
- "name": "constant.other.color.rgb-value.css"
1359
+ "match": "(?xi) (?<![\\w-])\n(?:\n # Standard CSS\n additive-symbols|align-content|align-items|align-self|all|animation|animation-delay|animation-direction\n | animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state\n | animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode\n | background-clip|background-color|background-image|background-origin|background-position|background-position-[xy]\n | background-repeat|background-size|block-size|border|border-block-end|border-block-end-color|border-block-end-style\n | border-block-end-width|border-block-start|border-block-start-color|border-block-start-style\n | border-block-start-width|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius\n | border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset\n | border-image-repeat|border-image-slice|border-image-source|border-image-width|border-inline-end\n | border-inline-end-color|border-inline-end-style|border-inline-end-width|border-inline-start\n | border-inline-start-color|border-inline-start-style|border-inline-start-width|border-left|border-left-color\n | border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style\n | border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius\n | border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-decoration-break\n | box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|clip-path|color\n | column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width\n | column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display\n | empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float\n | font|font-family|font-feature-settings|font-kerning|font-language-override|font-size|font-size-adjust\n | font-stretch|font-style|font-synthesis|font-variant|font-variant-alternates|font-variant-caps\n | font-variant-east-asian|font-variant-ligatures|font-variant-numeric|font-variant-position|font-weight\n | grid|grid-area|grid-auto-columns|grid-auto-flow|grid-auto-rows|grid-column|grid-column-end|grid-column-gap\n | grid-column-start|grid-gap|grid-row|grid-row-end|grid-row-gap|grid-row-start|grid-template|grid-template-areas\n | grid-template-columns|grid-template-rows|height|hyphens|image-orientation|image-rendering|image-resolution\n | ime-mode|inline-size|isolation|justify-content|left|letter-spacing|line-break|line-height|list-style\n | list-style-image|list-style-position|list-style-type|margin|margin-block-end|margin-block-start|margin-bottom\n | margin-inline-end|margin-inline-start|margin-left|margin-right|margin-top|mask|mask-clip|mask-composite\n | mask-image|mask-mode|mask-origin|mask-position|mask-repeat|mask-size|mask-type|max-block-size|max-height\n | max-inline-size|max-width|max-zoom|min-block-size|min-height|min-inline-size|min-width|min-zoom|mix-blend-mode\n | negative|object-fit|object-position|offset-block-end|offset-block-start|offset-inline-end|offset-inline-start\n | opacity|order|orientation|orphans|outline|outline-color|outline-offset|outline-style|outline-width|overflow\n | overflow-wrap|overflow-[xy]|pad|padding|padding-block-end|padding-block-start|padding-bottom|padding-inline-end\n | padding-inline-start|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside\n | perspective|perspective-origin|pointer-events|position|prefix|quotes|range|resize|right|ruby-align|ruby-merge\n | ruby-position|scroll-behavior|scroll-snap-coordinate|scroll-snap-destination|scroll-snap-type|shape-image-threshold\n | shape-margin|shape-outside|speak-as|src|suffix|symbols|system|tab-size|table-layout|text-align|text-align-last\n | text-combine-upright|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-emphasis\n | text-emphasis-color|text-emphasis-position|text-emphasis-style|text-indent|text-orientation|text-overflow\n | text-rendering|text-shadow|text-transform|text-underline-position|top|touch-action|transform|transform-box\n | transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property\n | transition-timing-function|unicode-bidi|unicode-range|user-zoom|vertical-align|visibility|white-space|widows\n | width|will-change|word-break|word-spacing|word-wrap|writing-mode|z-index|zoom\n\n # SVG attributes\n | alignment-baseline|baseline-shift|clip-rule|color-interpolation|color-interpolation-filters|color-profile\n | color-rendering|dominant-baseline|enable-background|fill|fill-opacity|fill-rule|flood-color|flood-opacity\n | glyph-orientation-horizontal|glyph-orientation-vertical|kerning|lighting-color|marker-end|marker-mid\n | marker-start|shape-rendering|stop-color|stop-opacity|stroke|stroke-dasharray|stroke-dashoffset|stroke-linecap\n | stroke-linejoin|stroke-miterlimit|stroke-opacity|stroke-width|text-anchor|x|y\n\n # Not listed on MDN; presumably deprecated\n | adjust|after|align|align-last|alignment|alignment-adjust|appearance|attachment|azimuth|background-break\n | balance|baseline|before|bidi|binding|bookmark|bookmark-label|bookmark-level|bookmark-target|border-length\n | bottom-color|bottom-left-radius|bottom-right-radius|bottom-style|bottom-width|box|box-align|box-direction\n | box-flex|box-flex-group|box-lines|box-ordinal-group|box-orient|box-pack|break|character|collapse|column\n | column-break-after|column-break-before|count|counter|crop|cue|cue-after|cue-before|decoration|decoration-break\n | delay|display-model|display-role|down|drop|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust\n | drop-initial-before-align|drop-initial-size|drop-initial-value|duration|elevation|emphasis|family|fit|fit-position\n | flex-group|float-offset|gap|grid-columns|grid-rows|hanging-punctuation|header|hyphenate|hyphenate-after|hyphenate-before\n | hyphenate-character|hyphenate-lines|hyphenate-resource|icon|image|increment|indent|index|initial-after-adjust\n | initial-after-align|initial-before-adjust|initial-before-align|initial-size|initial-value|inline-box-align|iteration-count\n | justify|label|left-color|left-style|left-width|length|level|line|line-stacking|line-stacking-ruby|line-stacking-shift\n | line-stacking-strategy|lines|list|mark|mark-after|mark-before|marks|marquee|marquee-direction|marquee-play-count|marquee-speed\n | marquee-style|max|min|model|move-to|name|nav|nav-down|nav-index|nav-left|nav-right|nav-up|new|numeral|offset|ordinal-group\n | orient|origin|overflow-style|overhang|pack|page|page-policy|pause|pause-after|pause-before|phonemes|pitch|pitch-range\n | play-count|play-during|play-state|point|presentation|presentation-level|profile|property|punctuation|punctuation-trim\n | radius|rate|rendering-intent|repeat|replace|reset|resolution|resource|respond-to|rest|rest-after|rest-before|richness\n | right-color|right-style|right-width|role|rotation|rotation-point|rows|ruby|ruby-overhang|ruby-span|rule|rule-color\n | rule-style|rule-width|shadow|size|size-adjust|sizing|space|space-collapse|spacing|span|speak|speak-header|speak-numeral\n | speak-punctuation|speech|speech-rate|speed|stacking|stacking-ruby|stacking-shift|stacking-strategy|stress|stretch\n | string-set|style|style-image|style-position|style-type|target|target-name|target-new|target-position|text|text-height\n | text-justify|text-outline|text-replace|text-wrap|timing-function|top-color|top-left-radius|top-right-radius|top-style\n | top-width|trim|unicode|up|user-select|variant|voice|voice-balance|voice-duration|voice-family|voice-pitch|voice-pitch-range\n | voice-rate|voice-stress|voice-volume|volume|weight|white|white-space-collapse|word|wrap\n)\n(?![\\w-])",
1360
+ "name": "support.type.property-name.css"
302
1361
  },
303
1362
  {
304
- "captures": {
305
- "1": {
306
- "name": "keyword.other.unit.css"
307
- }
308
- },
309
- "match": "(?x)\n\t\t\t\t\t (?:-|\\+)?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))\n\t\t\t\t\t ((?:px|pt|ch|cm|mm|in|r?em|ex|pc|deg|g?rad|dpi|dpcm|s)\\b|%)?\n\t\t\t\t\t",
310
- "name": "constant.numeric.css"
1363
+ "match": "(?<![\\w-])(?i:-(?:ah|apple|atsc|epub|hp|khtml|moz|ms|o|rim|ro|tc|wap|webkit|xv)|(?:mso|prince))-[a-zA-Z-]+",
1364
+ "name": "support.type.vendored.property-name.css"
311
1365
  }
312
1366
  ]
313
1367
  },
314
1368
  "property-values": {
315
1369
  "patterns": [
316
1370
  {
317
- "match": "\\b(absolute|all(-scroll)?|always|armenian|auto|avoid|baseline|below|bidi-override|block|bold|bolder|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|geometricPrecision|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|optimize(Legibility|Quality|Speed)|outset|outside|overline|pointer|pre(-(wrap|line))?|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|sub|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical(-(ideographic|text))?|visible(Painted|Fill|Stroke)?|w-resize|wait|whitespace|zero|smaller|larger|((xx?-)?(small|large))|painted|fill|stroke)\\b",
318
- "name": "support.constant.property-value.css"
1371
+ "include": "#commas"
319
1372
  },
320
1373
  {
321
- "match": "(\\b(?i:arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace)\\b)",
322
- "name": "support.constant.font-name.css"
1374
+ "include": "#comment-block"
323
1375
  },
324
1376
  {
325
- "include": "#numeric-values"
1377
+ "include": "#escapes"
326
1378
  },
327
1379
  {
328
- "include": "#color-values"
1380
+ "include": "#functions"
329
1381
  },
330
1382
  {
331
- "include": "#string-double"
1383
+ "include": "#property-keywords"
332
1384
  },
333
1385
  {
334
- "include": "#string-single"
1386
+ "include": "#unicode-range"
335
1387
  },
336
1388
  {
337
- "begin": "(rect)\\s*(\\()",
338
- "beginCaptures": {
339
- "1": {
340
- "name": "support.function.misc.css"
341
- },
342
- "2": {
343
- "name": "punctuation.section.function.css"
344
- }
345
- },
346
- "end": "(\\))",
347
- "endCaptures": {
348
- "1": {
349
- "name": "punctuation.section.function.css"
350
- }
351
- },
352
- "patterns": [
353
- {
354
- "include": "#numeric-values"
355
- }
356
- ]
1389
+ "include": "#numeric-values"
357
1390
  },
358
1391
  {
359
- "begin": "(format|local|url|attr|counter|counters)\\s*(\\()",
360
- "beginCaptures": {
361
- "1": {
362
- "name": "support.function.misc.css"
363
- },
364
- "2": {
365
- "name": "punctuation.section.function.css"
366
- }
367
- },
368
- "end": "(\\))",
369
- "endCaptures": {
370
- "1": {
371
- "name": "punctuation.section.function.css"
372
- }
373
- },
374
- "patterns": [
375
- {
376
- "include": "#string-single"
377
- },
378
- {
379
- "include": "#string-double"
380
- },
381
- {
382
- "match": "[^'\") \\t]+",
383
- "name": "variable.parameter.misc.css"
384
- }
385
- ]
1392
+ "include": "#color-keywords"
386
1393
  },
387
1394
  {
388
- "match": "\\!\\s*important",
1395
+ "include": "#string"
1396
+ },
1397
+ {
1398
+ "match": "!\\s*important(?![\\w-])",
389
1399
  "name": "keyword.other.important.css"
390
1400
  }
391
1401
  ]
392
1402
  },
1403
+ "pseudo-classes": {
1404
+ "captures": {
1405
+ "1": {
1406
+ "name": "punctuation.definition.entity.css"
1407
+ },
1408
+ "2": {
1409
+ "name": "invalid.illegal.colon.css"
1410
+ }
1411
+ },
1412
+ "match": "(?xi)\n(:)(:*)\n(?: active|any-link|checked|default|disabled|empty|enabled|first\n | (?:first|last|only)-(?:child|of-type)|focus|fullscreen|host|hover\n | in-range|indeterminate|invalid|left|link|optional|out-of-range\n | read-only|read-write|required|right|root|scope|target|unresolved\n | valid|visited\n)(?![\\w-])",
1413
+ "name": "entity.other.attribute-name.pseudo-class.css"
1414
+ },
1415
+ "pseudo-elements": {
1416
+ "captures": {
1417
+ "1": {
1418
+ "name": "punctuation.definition.entity.css"
1419
+ },
1420
+ "2": {
1421
+ "name": "punctuation.definition.entity.css"
1422
+ }
1423
+ },
1424
+ "match": "(?xi)\n(?:\n (::?) # Elements using both : and :: notation\n (?: after\n | before\n | first-letter\n | first-line\n | (?:-(?:ah|apple|atsc|epub|hp|khtml|moz\n |ms|o|rim|ro|tc|wap|webkit|xv)\n | (?:mso|prince))\n -[a-z-]+\n )\n |\n (::) # Double-colon only\n (?: backdrop\n | content\n | grammar-error\n | marker\n | placeholder\n | selection\n | shadow\n | spelling-error\n )\n)\n(?![\\w-])",
1425
+ "name": "entity.other.attribute-name.pseudo-element.css"
1426
+ },
393
1427
  "rule-list": {
394
- "begin": "\\{",
1428
+ "begin": "{",
395
1429
  "beginCaptures": {
396
1430
  "0": {
397
- "name": "punctuation.section.property-list.begin.css"
1431
+ "name": "punctuation.section.property-list.begin.bracket.curly.css"
398
1432
  }
399
1433
  },
400
- "end": "\\}",
1434
+ "end": "}",
401
1435
  "endCaptures": {
402
1436
  "0": {
403
- "name": "punctuation.section.property-list.end.css"
1437
+ "name": "punctuation.section.property-list.end.bracket.curly.css"
404
1438
  }
405
1439
  },
406
1440
  "name": "meta.property-list.css",
1441
+ "patterns": [
1442
+ {
1443
+ "include": "#rule-list-innards"
1444
+ }
1445
+ ]
1446
+ },
1447
+ "rule-list-innards": {
407
1448
  "patterns": [
408
1449
  {
409
1450
  "include": "#comment-block"
410
1451
  },
411
1452
  {
412
- "begin": "(?<![-a-z])(?=[-a-z])",
413
- "end": "$|(?![-a-z])",
1453
+ "include": "#escapes"
1454
+ },
1455
+ {
1456
+ "include": "#font-features"
1457
+ },
1458
+ {
1459
+ "match": "(?x) (?<![\\w-])\n--\n(?:[-a-zA-Z_] | [^\\x00-\\x7F]) # First letter\n(?:[-a-zA-Z0-9_] | [^\\x00-\\x7F] # Remainder of identifier\n |\\\\(?:[0-9a-fA-F]{1,6}|.)\n)*",
1460
+ "name": "variable.css"
1461
+ },
1462
+ {
1463
+ "begin": "(?<![-a-zA-Z])(?=[-a-zA-Z])",
1464
+ "end": "$|(?![-a-zA-Z])",
414
1465
  "name": "meta.property-name.css",
415
1466
  "patterns": [
416
1467
  {
417
- "match": "\\b(-webkit-[A-Za-z]+|-moz-[A-Za-z]+|-o-[A-Za-z]+|-ms-[A-Za-z]+|-khtml-[A-Za-z]+|zoom|z-index|y|x|wrap|word-wrap|word-spacing|word-break|word|width|widows|white-space-collapse|white-space|white|weight|volume|voice-volume|voice-stress|voice-rate|voice-pitch-range|voice-pitch|voice-family|voice-duration|voice-balance|voice|visibility|vertical-align|variant|user-select|up|unicode-bidi|unicode|trim|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform|top-width|top-style|top-right-radius|top-left-radius|top-color|top|timing-function|text-wrap|text-transform|text-shadow|text-replace|text-outline|text-justify|text-indent|text-height|text-emphasis|text-decoration|text-align-last|text-align|text|target-position|target-new|target-name|target|table-layout|tab-size|style-type|style-position|style-image|style|string-set|stretch|stress|stacking-strategy|stacking-shift|stacking-ruby|stacking|src|speed|speech-rate|speech|speak-punctuation|speak-numeral|speak-header|speak|span|spacing|space-collapse|space|sizing|size-adjust|size|shadow|respond-to|rule-width|rule-style|rule-color|rule|ruby-span|ruby-position|ruby-overhang|ruby-align|ruby|rows|rotation-point|rotation|role|right-width|right-style|right-color|right|richness|rest-before|rest-after|rest|resource|resolution|resize|reset|replace|repeat|rendering-intent|rate|radius|quotes|punctuation-trim|punctuation|property|profile|presentation-level|presentation|position|pointer-events|point|play-state|play-during|play-count|pitch-range|pitch|phonemes|pause-before|pause-after|pause|page-policy|page-break-inside|page-break-before|page-break-after|page|padding-top|padding-right|padding-left|padding-bottom|padding|pack|overhang|overflow-y|overflow-x|overflow-style|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|origin|orientation|orient|ordinal-group|opacity|offset|numeral|new|nav-up|nav-right|nav-left|nav-index|nav-down|nav|name|move-to|model|min-width|min-height|min|max-width|max-height|max|marquee-style|marquee-speed|marquee-play-count|marquee-direction|marquee|marks|mark-before|mark-after|mark|margin-top|margin-right|margin-left|margin-bottom|margin|mask-image|list-style-type|list-style-position|list-style-image|list-style|list|lines|line-stacking-strategy|line-stacking-shift|line-stacking-ruby|line-stacking|line-height|line|level|letter-spacing|length|left-width|left-style|left-color|left|label|justify|iteration-count|inline-box-align|initial-value|initial-size|initial-before-align|initial-before-adjust|initial-after-align|initial-after-adjust|index|indent|increment|image-resolution|image-orientation|image|icon|hyphens|hyphenate-resource|hyphenate-lines|hyphenate-character|hyphenate-before|hyphenate-after|hyphenate|height|header|hanging-punctuation|grid-rows|grid-columns|grid|gap|font-weight|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-family|font|float-offset|float|flex-group|flex|fit-position|fit|fill|filter|family|empty-cells|emphasis|elevation|duration|drop-initial-value|drop-initial-size|drop-initial-before-align|drop-initial-before-adjust|drop-initial-after-align|drop-initial-after-adjust|drop|down|dominant-baseline|display-role|display-model|display|direction|delay|decoration-break|decoration|cursor|cue-before|cue-after|cue|crop|counter-reset|counter-increment|counter|count|content|columns|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|column-break-before|column-break-after|column|color-profile|color|collapse|clip|clear|character|caption-side|break-inside|break-before|break-after|break|box-sizing|box-shadow|box-pack|box-orient|box-ordinal-group|box-lines|box-flex-group|box-flex|box-direction|box-decoration-break|box-align|box|bottom-width|bottom-style|bottom-right-radius|bottom-left-radius|bottom-color|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-length|border-left-width|border-left-style|border-left-color|border-left|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|bookmark-target|bookmark-level|bookmark-label|bookmark|binding|bidi|before|baseline-shift|baseline|balance|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-break|background-attachment|background|azimuth|attachment|appearance|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-duration|animation-direction|animation-delay|animation|alignment-baseline|alignment-adjust|alignment|align-last|align|after|adjust)\\b",
418
- "name": "support.type.property-name.css"
1468
+ "include": "#property-names"
419
1469
  }
420
1470
  ]
421
1471
  },
@@ -426,47 +1476,65 @@
426
1476
  "name": "punctuation.separator.key-value.css"
427
1477
  }
428
1478
  },
429
- "end": "\\s*(;|(?=\\}))",
1479
+ "end": "\\s*(;)|\\s*(?=}|\\))",
430
1480
  "endCaptures": {
431
1481
  "1": {
432
1482
  "name": "punctuation.terminator.rule.css"
433
1483
  }
434
1484
  },
435
- "name": "meta.property-value.css",
1485
+ "contentName": "meta.property-value.css",
436
1486
  "patterns": [
1487
+ {
1488
+ "include": "#comment-block"
1489
+ },
437
1490
  {
438
1491
  "include": "#property-values"
439
1492
  }
440
1493
  ]
1494
+ },
1495
+ {
1496
+ "match": ";",
1497
+ "name": "punctuation.terminator.rule.css"
441
1498
  }
442
1499
  ]
443
1500
  },
444
1501
  "selector": {
445
- "begin": "\\s*(?=[:.*#a-zA-Z])",
446
- "end": "(?=[/@{)])",
1502
+ "begin": "(?x)\n(?=\n (?:\\|)? # Possible anonymous namespace prefix\n (?:\n [-\\[:.*\\#a-zA-Z_] # Valid selector character\n |\n [^\\x00-\\x7F] # Which can include non-ASCII symbols\n |\n \\\\ # Or an escape sequence\n (?:[0-9a-fA-F]{1,6}|.)\n )\n)",
1503
+ "end": "(?=\\s*[/@{)])",
447
1504
  "name": "meta.selector.css",
448
1505
  "patterns": [
449
1506
  {
450
- "match": "\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|main|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",
451
- "name": "entity.name.tag.css"
1507
+ "include": "#selector-innards"
1508
+ }
1509
+ ]
1510
+ },
1511
+ "selector-innards": {
1512
+ "patterns": [
1513
+ {
1514
+ "include": "#comment-block"
452
1515
  },
453
1516
  {
454
- "captures": {
455
- "1": {
456
- "name": "punctuation.definition.entity.css"
457
- }
458
- },
459
- "match": "(\\.)[a-zA-Z0-9_-]+",
460
- "name": "entity.other.attribute-name.class.css"
1517
+ "include": "#commas"
1518
+ },
1519
+ {
1520
+ "include": "#escapes"
1521
+ },
1522
+ {
1523
+ "include": "#combinators"
461
1524
  },
462
1525
  {
463
1526
  "captures": {
464
1527
  "1": {
465
- "name": "punctuation.definition.entity.css"
1528
+ "name": "entity.other.namespace-prefix.css"
1529
+ },
1530
+ "2": {
1531
+ "name": "punctuation.separator.css"
466
1532
  }
467
1533
  },
468
- "match": "(#)[a-zA-Z][a-zA-Z0-9_-]*",
469
- "name": "entity.other.attribute-name.id.css"
1534
+ "match": "(?x)\n(?:^|(?<=[\\s,(};])) # Follows whitespace, comma, semicolon, or bracket\n(?!\n [-\\w*]+\n \\|\n (?!\n [-\\[:.*\\#a-zA-Z_] # Make sure there's a selector to match\n | [^\\x00-\\x7F]\n )\n)\n(\n (?: [-a-zA-Z_] | [^\\x00-\\x7F] ) # First letter\n (?: [-a-zA-Z0-9_] | [^\\x00-\\x7F] # Remainder of identifier\n | \\\\(?:[0-9a-fA-F]{1,6}|.)\n )*\n |\n \\* # Universal namespace\n)?\n(\\|) # Namespace separator"
1535
+ },
1536
+ {
1537
+ "include": "#tag-names"
470
1538
  },
471
1539
  {
472
1540
  "match": "\\*",
@@ -476,155 +1544,257 @@
476
1544
  "captures": {
477
1545
  "1": {
478
1546
  "name": "punctuation.definition.entity.css"
1547
+ },
1548
+ "2": {
1549
+ "patterns": [
1550
+ {
1551
+ "include": "#escapes"
1552
+ }
1553
+ ]
479
1554
  }
480
1555
  },
481
- "match": "(:+)(after|before|first-letter|first-line|selection)\\b",
482
- "name": "entity.other.attribute-name.pseudo-element.css"
1556
+ "match": "(?x) (?<![@\\w-])\n([.\\#])\n# Invalid identifier\n(\n (?:\n # Starts with ASCII digits, with possible hyphen preceding it\n -?[0-9]\n |\n # Consists of a hyphen only\n - # Terminated by either:\n (?= $ # - End-of-line\n | [\\s,.\\#)\\[:{>+~|] # - Followed by another selector\n | /\\* # - Followed by a block comment\n )\n |\n # Name contains unescaped ASCII symbol\n (?: # Check for acceptable preceding characters\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # - Valid selector character\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # - Escape sequence\n )*\n (?: # Invalid punctuation\n [!\"'%&(*;<?@^`|\\]}] # - NOTE: We exempt `)` from the list of checked\n | # symbols to avoid matching `:not(.invalid)`\n / (?!\\*) # - Avoid invalidating the start of a comment\n )+\n )\n # Mark remainder of selector invalid\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # - Otherwise valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # - Escape sequence\n )*\n)",
1557
+ "name": "invalid.illegal.bad-identifier.css"
483
1558
  },
484
1559
  {
485
1560
  "captures": {
486
1561
  "1": {
487
1562
  "name": "punctuation.definition.entity.css"
1563
+ },
1564
+ "2": {
1565
+ "patterns": [
1566
+ {
1567
+ "include": "#escapes"
1568
+ }
1569
+ ]
488
1570
  }
489
1571
  },
490
- "match": "(:)((first|last)-child|(first|last|only)-of-type|empty|root|target|first|left|right)\\b",
491
- "name": "entity.other.attribute-name.pseudo-class.css"
1572
+ "match": "(?x)\n(\\.) # Valid class-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n)",
1573
+ "name": "entity.other.attribute-name.class.css"
492
1574
  },
493
1575
  {
494
1576
  "captures": {
495
1577
  "1": {
496
1578
  "name": "punctuation.definition.entity.css"
1579
+ },
1580
+ "2": {
1581
+ "patterns": [
1582
+ {
1583
+ "include": "#escapes"
1584
+ }
1585
+ ]
497
1586
  }
498
1587
  },
499
- "match": "(:)(checked|enabled|default|disabled|indeterminate|invalid|optional|required|valid)\\b",
500
- "name": "entity.other.attribute-name.pseudo-class.ui-state.css"
1588
+ "match": "(?x)\n(\\#)\n(\n -?\n (?![0-9])\n (?:[-a-zA-Z0-9_]|[^\\x00-\\x7F]|\\\\(?:[0-9a-fA-F]{1,6}|.))+\n)\n(?=$|[\\s,.\\#)\\[:{>+~|]|/\\*)",
1589
+ "name": "entity.other.attribute-name.id.css"
501
1590
  },
502
1591
  {
503
- "begin": "((:)not)(\\()",
1592
+ "begin": "\\[",
504
1593
  "beginCaptures": {
505
- "1": {
506
- "name": "entity.other.attribute-name.pseudo-class.css"
507
- },
508
- "2": {
509
- "name": "punctuation.definition.entity.css"
510
- },
511
- "3": {
512
- "name": "punctuation.section.function.css"
1594
+ "0": {
1595
+ "name": "punctuation.definition.entity.begin.bracket.square.css"
513
1596
  }
514
1597
  },
515
- "end": "\\)",
1598
+ "end": "\\]",
516
1599
  "endCaptures": {
517
1600
  "0": {
518
- "name": "punctuation.section.function.css"
1601
+ "name": "punctuation.definition.entity.end.bracket.square.css"
519
1602
  }
520
1603
  },
1604
+ "name": "meta.attribute-selector.css",
521
1605
  "patterns": [
522
1606
  {
523
- "include": "#selector"
524
- }
525
- ]
526
- },
527
- {
528
- "captures": {
529
- "1": {
530
- "name": "entity.other.attribute-name.pseudo-class.css"
1607
+ "include": "#comment-block"
531
1608
  },
532
- "2": {
533
- "name": "punctuation.definition.entity.css"
1609
+ {
1610
+ "include": "#string"
534
1611
  },
535
- "3": {
536
- "name": "punctuation.section.function.css"
1612
+ {
1613
+ "captures": {
1614
+ "1": {
1615
+ "name": "storage.modifier.ignore-case.css"
1616
+ }
1617
+ },
1618
+ "match": "(?<=[\"'\\s]|^|\\*/)\\s*([iI])\\s*(?=[\\s\\]]|/\\*|$)"
537
1619
  },
538
- "4": {
539
- "name": "constant.numeric.css"
1620
+ {
1621
+ "captures": {
1622
+ "1": {
1623
+ "name": "string.unquoted.attribute-value.css",
1624
+ "patterns": [
1625
+ {
1626
+ "include": "#escapes"
1627
+ }
1628
+ ]
1629
+ }
1630
+ },
1631
+ "match": "(?x)(?<==)\\s*((?!/\\*)(?:[^\\\\\"'\\s\\]]|\\\\.)+)"
1632
+ },
1633
+ {
1634
+ "include": "#escapes"
1635
+ },
1636
+ {
1637
+ "match": "[~|^$*]?=",
1638
+ "name": "keyword.operator.pattern.css"
1639
+ },
1640
+ {
1641
+ "match": "\\|",
1642
+ "name": "punctuation.separator.css"
1643
+ },
1644
+ {
1645
+ "captures": {
1646
+ "1": {
1647
+ "name": "entity.other.namespace-prefix.css",
1648
+ "patterns": [
1649
+ {
1650
+ "include": "#escapes"
1651
+ }
1652
+ ]
1653
+ }
1654
+ },
1655
+ "match": "(?x)\n# Qualified namespace prefix\n( -?(?!\\d)(?:[\\w-]|[^\\x00-\\x7F]|\\\\(?:[0-9a-fA-F]{1,6}|.))+\n| \\*\n)\n# Lookahead to ensure there's a valid identifier ahead\n(?=\n \\| (?!\\s|=|$|\\])\n (?: -?(?!\\d)\n | [\\\\\\w-]\n | [^\\x00-\\x7F]\n )\n)"
540
1656
  },
541
- "5": {
542
- "name": "punctuation.section.function.css"
1657
+ {
1658
+ "captures": {
1659
+ "1": {
1660
+ "name": "entity.other.attribute-name.css",
1661
+ "patterns": [
1662
+ {
1663
+ "include": "#escapes"
1664
+ }
1665
+ ]
1666
+ }
1667
+ },
1668
+ "match": "(?x)\n(-?(?!\\d)(?:[\\w-]|[^\\x00-\\x7F]|\\\\(?:[0-9a-fA-F]{1,6}|.))+)\n\\s*\n(?=[~|^\\]$*=]|/\\*)"
543
1669
  }
544
- },
545
- "match": "((:)nth-(?:(?:last-)?child|(?:last-)?of-type))(\\()(\\-?(?:\\d+n?|n)(?:\\+\\d+)?|even|odd)(\\))"
1670
+ ]
546
1671
  },
547
1672
  {
548
- "captures": {
549
- "1": {
550
- "name": "punctuation.definition.entity.css"
1673
+ "include": "#pseudo-classes"
1674
+ },
1675
+ {
1676
+ "include": "#pseudo-elements"
1677
+ },
1678
+ {
1679
+ "include": "#functional-pseudo-classes"
1680
+ },
1681
+ {
1682
+ "match": "(?x) (?<![@\\w-])\n(?= # Custom element names must:\n [a-z] # - start with a lowercase ASCII letter,\n \\w* - # - contain at least one dash\n)\n(?:\n (?![A-Z]) # No uppercase ASCII letters are allowed\n [\\w-] # Allow any other word character or dash\n)+\n(?![(\\w-])",
1683
+ "name": "entity.name.tag.custom.css"
1684
+ }
1685
+ ]
1686
+ },
1687
+ "string": {
1688
+ "patterns": [
1689
+ {
1690
+ "begin": "\"",
1691
+ "beginCaptures": {
1692
+ "0": {
1693
+ "name": "punctuation.definition.string.begin.css"
1694
+ }
1695
+ },
1696
+ "end": "\"|(?<!\\\\)(?=$|\\n)",
1697
+ "endCaptures": {
1698
+ "0": {
1699
+ "name": "punctuation.definition.string.end.css"
551
1700
  }
552
1701
  },
553
- "match": "(:)(active|hover|link|visited|focus)\\b",
554
- "name": "entity.other.attribute-name.pseudo-class.css"
1702
+ "name": "string.quoted.double.css",
1703
+ "patterns": [
1704
+ {
1705
+ "begin": "(?:\\G|^)(?=(?:[^\\\\\"]|\\\\.)+$)",
1706
+ "end": "$",
1707
+ "name": "invalid.illegal.unclosed.string.css",
1708
+ "patterns": [
1709
+ {
1710
+ "include": "#escapes"
1711
+ }
1712
+ ]
1713
+ },
1714
+ {
1715
+ "include": "#escapes"
1716
+ }
1717
+ ]
555
1718
  },
556
1719
  {
557
- "captures": {
558
- "1": {
559
- "name": "punctuation.definition.entity.css"
560
- },
561
- "2": {
562
- "name": "entity.other.attribute-name.attribute.css"
563
- },
564
- "3": {
565
- "name": "punctuation.separator.operator.css"
566
- },
567
- "4": {
568
- "name": "string.unquoted.attribute-value.css"
569
- },
570
- "5": {
571
- "name": "string.quoted.double.attribute-value.css"
572
- },
573
- "6": {
1720
+ "begin": "'",
1721
+ "beginCaptures": {
1722
+ "0": {
574
1723
  "name": "punctuation.definition.string.begin.css"
575
- },
576
- "7": {
1724
+ }
1725
+ },
1726
+ "end": "'|(?<!\\\\)(?=$|\\n)",
1727
+ "endCaptures": {
1728
+ "0": {
577
1729
  "name": "punctuation.definition.string.end.css"
578
1730
  }
579
1731
  },
580
- "match": "(?i)(\\[)\\s*(-?[_a-z\\\\[[:^ascii:]]][_a-z0-9\\-\\\\[[:^ascii:]]]*)(?:\\s*([~|^$*]?=)\\s*(?:(-?[_a-z\\\\[[:^ascii:]]][_a-z0-9\\-\\\\[[:^ascii:]]]*)|((?>(['\"])(?:[^\\\\]|\\\\.)*?(\\6)))))?\\s*(\\])",
581
- "name": "meta.attribute-selector.css"
1732
+ "name": "string.quoted.single.css",
1733
+ "patterns": [
1734
+ {
1735
+ "begin": "(?:\\G|^)(?=(?:[^\\\\']|\\\\.)+$)",
1736
+ "end": "$",
1737
+ "name": "invalid.illegal.unclosed.string.css",
1738
+ "patterns": [
1739
+ {
1740
+ "include": "#escapes"
1741
+ }
1742
+ ]
1743
+ },
1744
+ {
1745
+ "include": "#escapes"
1746
+ }
1747
+ ]
582
1748
  }
583
1749
  ]
584
1750
  },
585
- "string-double": {
586
- "begin": "\"",
587
- "beginCaptures": {
588
- "0": {
589
- "name": "punctuation.definition.string.begin.css"
590
- }
591
- },
592
- "end": "\"",
593
- "endCaptures": {
1751
+ "tag-names": {
1752
+ "match": "(?xi) (?<![\\w:-])\n(?:\n # HTML\n a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdi|bdo|bgsound\n | big|blink|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command\n | content|data|datalist|dd|del|details|dfn|dialog|dir|div|dl|dt|element|em|embed|fieldset\n | figcaption|figure|font|footer|form|frame|frameset|h[1-6]|head|header|hgroup|hr|html|i\n | iframe|image|img|input|ins|isindex|kbd|keygen|label|legend|li|link|listing|main|map|mark\n | marquee|math|menu|menuitem|meta|meter|multicol|nav|nextid|nobr|noembed|noframes|noscript\n | object|ol|optgroup|option|output|p|param|picture|plaintext|pre|progress|q|rb|rp|rt|rtc\n | ruby|s|samp|script|section|select|shadow|slot|small|source|spacer|span|strike|strong\n | style|sub|summary|sup|table|tbody|td|template|textarea|tfoot|th|thead|time|title|tr\n | track|tt|u|ul|var|video|wbr|xmp\n\n # SVG\n | altGlyph|altGlyphDef|altGlyphItem|animate|animateColor|animateMotion|animateTransform\n | circle|clipPath|color-profile|cursor|defs|desc|discard|ellipse|feBlend|feColorMatrix\n | feComponentTransfer|feComposite|feConvolveMatrix|feDiffuseLighting|feDisplacementMap\n | feDistantLight|feDropShadow|feFlood|feFuncA|feFuncB|feFuncG|feFuncR|feGaussianBlur\n | feImage|feMerge|feMergeNode|feMorphology|feOffset|fePointLight|feSpecularLighting\n | feSpotLight|feTile|feTurbulence|filter|font-face|font-face-format|font-face-name\n | font-face-src|font-face-uri|foreignObject|g|glyph|glyphRef|hatch|hatchpath|hkern\n | line|linearGradient|marker|mask|mesh|meshgradient|meshpatch|meshrow|metadata\n | missing-glyph|mpath|path|pattern|polygon|polyline|radialGradient|rect|set|solidcolor\n | stop|svg|switch|symbol|text|textPath|tref|tspan|use|view|vkern\n\n # MathML\n | annotation|annotation-xml|maction|maligngroup|malignmark|math|menclose|merror|mfenced\n | mfrac|mglyph|mi|mlabeledtr|mlongdiv|mmultiscripts|mn|mo|mover|mpadded|mphantom|mroot\n | mrow|ms|mscarries|mscarry|msgroup|msline|mspace|msqrt|msrow|mstack|mstyle|msub|msubsup\n | msup|mtable|mtd|mtext|mtr|munder|munderover|semantics\n)\n(?=[+~>\\s,.\\#|){:\\[]|/\\*|$)",
1753
+ "name": "entity.name.tag.css"
1754
+ },
1755
+ "unicode-range": {
1756
+ "captures": {
594
1757
  "0": {
595
- "name": "punctuation.definition.string.end.css"
1758
+ "name": "constant.other.unicode-range.css"
1759
+ },
1760
+ "1": {
1761
+ "name": "punctuation.separator.dash.unicode-range.css"
596
1762
  }
597
1763
  },
598
- "name": "string.quoted.double.css",
599
- "patterns": [
600
- {
601
- "match": "\\\\.",
602
- "name": "constant.character.escape.css"
603
- }
604
- ]
1764
+ "match": "(?<![\\w-])[Uu]\\+[0-9A-Fa-f?]{1,6}(?:(-)[0-9A-Fa-f]{1,6})?(?![\\w-])"
605
1765
  },
606
- "string-single": {
607
- "begin": "'",
1766
+ "url": {
1767
+ "begin": "(?i)(?<![\\w@-])(url)(\\()",
608
1768
  "beginCaptures": {
609
- "0": {
610
- "name": "punctuation.definition.string.begin.css"
1769
+ "1": {
1770
+ "name": "support.function.url.css"
1771
+ },
1772
+ "2": {
1773
+ "name": "punctuation.section.function.begin.bracket.round.css"
611
1774
  }
612
1775
  },
613
- "end": "'",
1776
+ "end": "\\)",
614
1777
  "endCaptures": {
615
1778
  "0": {
616
- "name": "punctuation.definition.string.end.css"
1779
+ "name": "punctuation.section.function.end.bracket.round.css"
617
1780
  }
618
1781
  },
619
- "name": "string.quoted.single.css",
1782
+ "name": "meta.function.url.css",
620
1783
  "patterns": [
621
1784
  {
622
- "match": "\\\\.",
623
- "name": "constant.character.escape.css"
1785
+ "match": "[^'\")\\s]+",
1786
+ "name": "variable.parameter.url.css"
1787
+ },
1788
+ {
1789
+ "include": "#string"
1790
+ },
1791
+ {
1792
+ "include": "#comment-block"
1793
+ },
1794
+ {
1795
+ "include": "#escapes"
624
1796
  }
625
1797
  ]
626
1798
  }
627
- },
628
- "scopeName": "source.css",
629
- "uuid": "69AA0917-B7BB-11D9-A7E2-000D93C8BE28"
1799
+ }
630
1800
  }