-
-
Notifications
You must be signed in to change notification settings - Fork 169
/
Styled Components.sublime-syntax
60 lines (51 loc) · 1.42 KB
/
Styled Components.sublime-syntax
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
56
57
58
59
60
%YAML 1.2
---
version: 2
extends: Packages/CSS/CSS.sublime-syntax
hidden: true
scope: source.js.css
file_extensions: []
first_line_match:
contexts:
main:
- meta_prepend: true
- match: (?=(?:{{html_tags}}|{{svg_tags}})(?!:))
push: styled-components-selector-body
- include: property-identifiers
- include: property-values
rule-list-body:
- meta_prepend: true
- include: main
comments:
- meta_prepend: true
- match: //
scope: punctuation.definition.comment.begin.css.styled-components
push:
- meta_scope: comment.line.double-slash.css.styled-components
- match: ^
pop: true
selectors:
- meta_prepend: true
- match: (?=&)
push: styled-components-selector-body
selector-body:
- meta_prepend: true
- match: \&
scope: variable.language.css.styled-components
selector-content:
- meta_prepend: true
- match: \&
scope: variable.language.css.styled-components
# Make sure that we handle both the old and new CSS context names
styled-components-selector-body:
- meta_scope: meta.selector.css
- include: selector-body
- include: selector-content
at-keyframe-block-body:
- meta_prepend: true
at-keyframe-block-content:
- meta_prepend: true
styled-components-keyframe-body:
- meta_scope: meta.at-rule.keyframe.css
- include: at-keyframe-block-body
- include: at-keyframe-block-content