Skip to content

Commit

Permalink
Account for CSS update
Browse files Browse the repository at this point in the history
  • Loading branch information
Thom1729 committed May 6, 2023
1 parent a2a94ed commit e4dac61
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ contexts:

styled-component-keyframes-end:
- !with
- include: scope:source.js.css#at-keyframe-block-content
- include: scope:source.js.css#styled-components-keyframe-body
- !include_resource Packages/JSCustom/extensions/custom_templates/template.yaml
- include: else-pop

Expand Down
27 changes: 25 additions & 2 deletions styled_components/Styled Components.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ contexts:
main:
- meta_prepend: true
- match: (?=(?:{{html_tags}}|{{svg_tags}})(?!:))
push: selector-content
push: styled-components-selector-body
- include: property-identifiers
- include: property-values

rule-list-body:
- meta_prepend: true
- include: main

comments:
Expand All @@ -29,9 +30,31 @@ contexts:
selectors:
- meta_prepend: true
- match: (?=&)
push: selector-content
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

0 comments on commit e4dac61

Please sign in to comment.