Skip to content

Commit

Permalink
Merge branch 'st4149'
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe committed Dec 17, 2024
2 parents 4399e1d + cfa29ee commit 2e273f4
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 0 deletions.
45 changes: 45 additions & 0 deletions Tailwind CSS.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ contexts:
- include: tailwind-at-tailwind
- include: tailwind-at-variants
- include: tailwind-at-screen
- include: tailwind-at-plugin
- include: tailwind-at-source

###[ TAILWIND INLINE AT RULES ]################################################

Expand Down Expand Up @@ -56,6 +58,28 @@ contexts:
- include: url-functions
- include: at-rule-end

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

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

tailwind-at-plugin-path:
- meta_include_prototype: false
- include: quoted-strings
- include: url-functions
- include: comments
- include: else-pop

tailwind-at-responsive:
- match: (@)responsive{{break}}
captures:
Expand Down Expand Up @@ -93,6 +117,27 @@ contexts:
- include: comments
- include: else-pop

tailwind-at-source:
- match: (@)source{{break}}
captures:
0: keyword.control.directive.css.tailwind
1: punctuation.definition.keyword.css.tailwind
push:
- tailwind-at-source-meta
- tailwind-at-source-path

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

tailwind-at-source-path:
- meta_include_prototype: false
- include: quoted-strings
- include: url-functions
- include: comments
- include: else-pop

tailwind-at-tailwind:
- match: (@)tailwind{{break}}
captures:
Expand Down
42 changes: 42 additions & 0 deletions tests/syntax_test.tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,48 @@
/*^^^^^ keyword.control.directive.css */
/* ^^^^^^^^^^^^^^^^^^^^^^ string.quoted.double.css */

@plugin "daisyui";
/*^^^^^^^^^^^^^^^ meta.at-rule.plugin.css.tailwind */
/*^^^^^ keyword.control.directive.css.tailwind */
/* ^^^^^^^^^ meta.string.css string.quoted.double.css */
/* ^ punctuation.definition.string.begin.css */
/* ^ punctuation.definition.string.end.css */
/* ^ punctuation.terminator.rule.css */

@plugin "daisyui/theme" {
/*^^^^^^^^^^^^^^^^^^^^^^^ meta.at-rule.plugin.css.tailwind */
/*^^^^^ keyword.control.directive.css.tailwind */
/* ^^^^^^^^^^^^^^^ meta.string.css string.quoted.double.css */
/* ^ punctuation.definition.string.begin.css */
/* ^ punctuation.definition.string.end.css */
/* ^ meta.block.css punctuation.section.block.begin.css */
name: "light";
/*^^^^^^^^^^^^^^ meta.at-rule.plugin.css.tailwind meta.block.css */
/*^^^^ meta.property-name.css support.type.property-name.css */
/* ^ punctuation.separator.key-value.css */
/* ^^^^^^^^ meta.property-value.css */
/* ^^^^^^^ meta.string.css string.quoted.double.css */
/* ^ punctuation.definition.string.begin.css */
/* ^ punctuation.definition.string.end.css */
/* ^ punctuation.terminator.rule.css */
--color-primary: red;
/*^^^^^^^^^^^^^^^^^^^^^ meta.at-rule.plugin.css.tailwind meta.block.css */
/*^^^^^^^^^^^^^^^ meta.property-name.css entity.other.custom-property.css */
/* ^ punctuation.separator.key-value.css */
/* ^^^^ meta.property-value.css */
/* ^^^ support.constant.color.w3c.standard.css */
/* ^ punctuation.terminator.rule.css */
}
/* <- meta.at-rule.plugin.css.tailwind meta.block.css punctuation.section.block.end.css */

@source "./app/views/**/*.rb";
/*^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.at-rule.source.css.tailwind */
/*^^^^^ keyword.control.directive.css.tailwind */
/* ^^^^^^^^^^^^^^^^^^^^^ meta.string.css string.quoted.double.css */
/* ^ punctuation.definition.string.begin.css */
/* ^ punctuation.definition.string.end.css */
/* ^ punctuation.terminator.rule.css */

@tailwind base;
/* <- meta.at-rule.tailwind.css.tailwind keyword.control.directive.css.tailwind punctuation.definition.keyword.css.tailwind */
/*^^^^^^^^^^^^ meta.at-rule.tailwind.css.tailwind */
Expand Down

0 comments on commit 2e273f4

Please sign in to comment.