1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
name: SCSS
file_extensions:
- scss
scope: source.scss
variables:
property: '[A-Za-z-]+'
contexts:
prototype:
- include: comments
main:
- include: strings
- match: '\$[A-Za-z_][A-Za-z0-9_-]*'
scope: variable.parameter.scss
- match: '\b(?:@mixin|@include|@use|@forward|@extend|@import|@media|@supports|@function|@return|@if|@else|@for|@each|@while)\b'
scope: keyword.control.scss
- match: '\b{{property}}(?=\s*:)'
scope: entity.other.attribute-name.scss
- match: '[#.:%]?[A-Za-z_][A-Za-z0-9_-]*(?=\s*[{,])'
scope: entity.name.tag.scss
- match: '#(?:[0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})\b'
scope: support.constant.color.scss
- match: '\b(?:0x[0-9A-Fa-f_]+|\d[\d_]*(?:\.\d[\d_]*)?(?:px|rem|em|vh|vw|%)?)\b'
scope: constant.numeric.scss
- match: '[-+*/=<>!]+'
scope: keyword.operator.scss
comments:
- match: '//.*$'
scope: comment.line.double-slash.scss
- match: '/\*'
push: block-comment
block-comment:
- meta_scope: comment.block.scss
- match: '/\*'
push: block-comment
- match: '\*/'
pop: true
strings:
- match: '"'
push: double-quoted-string
- match: "'"
push: single-quoted-string
double-quoted-string:
- meta_scope: string.quoted.double.scss
- match: '\\.'
scope: constant.character.escape.scss
- match: '"'
pop: true
single-quoted-string:
- meta_scope: string.quoted.single.scss
- match: '\\.'
scope: constant.character.escape.scss
- match: "'"
pop: true