Skip to content

Commit

Permalink
feat: add support for top-level @Utility
Browse files Browse the repository at this point in the history
  • Loading branch information
mhenrixon committed Jan 4, 2025
1 parent 2e273f4 commit 7f85b45
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Tailwind CSS.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ contexts:

at-other:
- meta_prepend: true
- include: tailwind-at-utility
- include: tailwind-at-apply
- include: tailwind-at-config
- include: tailwind-at-responsive
Expand Down Expand Up @@ -44,6 +45,32 @@ contexts:

###[ TAILWIND TOPLEVEL AT RULES ]##############################################

tailwind-at-utility:
- match: (@)utility{{break}}
captures:
0: keyword.control.directive.css.tailwind
1: punctuation.definition.keyword.css.tailwind
push:
- tailwind-at-utility-meta
- maybe-stylesheet-block
- tailwind-at-utility-name

tailwind-at-utility-meta:
- meta_include_prototype: false
- meta_scope: meta.at-rule.utility.css.tailwind
- include: immediately-pop

tailwind-at-utility-name:
- meta_include_prototype: false
- match: '{{ident_begin}}'
set: tailwind-at-utility-name-content
- include: comments
- include: else-pop

tailwind-at-utility-name-content:
- meta_scope: entity.other.utility-name.css.tailwind
- include: identifier-content

# @config "./tailwind.config.js"
tailwind-at-config:
- match: (@)(?i:config){{break}}
Expand Down

0 comments on commit 7f85b45

Please sign in to comment.