Skip to content

Commit 58fb21c

Browse files
author
deathaxe
committed
Add support for wildcards in custom properties
Used in @themes by Tailwind CSS 4.0
1 parent 35951b3 commit 58fb21c

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

Tailwind CSS.sublime-syntax

+8
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ contexts:
5757

5858
properties-or-selectors:
5959
# required until ST4174 (PR #3898)
60+
- include: custom-properties
6061
- match: '{{property_or_selector_begin}}'
6162
branch_point: property-or-selector
6263
branch:
@@ -113,6 +114,13 @@ contexts:
113114
- match: ','
114115
scope: invalid.illegal.unexpected-token.css
115116

117+
###[ CSS PROPERTY IDENTIFIERS ]################################################
118+
119+
custom-property-content:
120+
- meta_prepend: true
121+
- match: \*
122+
scope: constant.other.wildcard.asterisk.css.tailwind
123+
116124
###[ TAILWIND INLINE AT RULES ]################################################
117125

118126
tailwind-at-apply:

tests/syntax_test.tailwind.css

+19
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,25 @@
155155
/*^^^^^^ meta.at-rule.theme.css.tailwind */
156156
/*^^^^ keyword.control.directive.css.tailwind */
157157
/* ^ meta.block.css punctuation.section.block.begin.css */
158+
159+
--*: initial;
160+
/*^^^^^^^^^^^^^ meta.at-rule.theme.css.tailwind meta.block.css */
161+
/*^^^ meta.property-name.css entity.other.custom-property.css */
162+
/* ^ constant.other.wildcard.asterisk.css.tailwind */
163+
/* ^ punctuation.separator.key-value.css */
164+
/* ^^^^^^^^ meta.property-value.css */
165+
/* ^^^^^^^ support.constant.property-value.css */
166+
/* ^ punctuation.terminator.rule.css */
167+
168+
--font-*: initial;
169+
/*^^^^^^^^^^^^^^^^^^ meta.at-rule.theme.css.tailwind meta.block.css */
170+
/*^^^^^^^^ meta.property-name.css entity.other.custom-property.css */
171+
/* ^ constant.other.wildcard.asterisk.css.tailwind */
172+
/* ^ punctuation.separator.key-value.css */
173+
/* ^^^^^^^^ meta.property-value.css */
174+
/* ^^^^^^^ support.constant.property-value.css */
175+
/* ^ punctuation.terminator.rule.css */
176+
158177
--font-display: "Satoshi", "sans-serif";
159178
/*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.at-rule.theme.css.tailwind meta.block.css */
160179
/*^^^^^^^^^^^^^^ meta.property-name.css entity.other.custom-property.css */

0 commit comments

Comments
 (0)