Skip to content

Commit

Permalink
Highlight @theme contents as a rule list (#937)
Browse files Browse the repository at this point in the history
* Highlight `@theme` contents as a rule list

* Update changelog
  • Loading branch information
thecrypticace committed Mar 26, 2024
1 parent cf97d7a commit ecce42b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/vscode-tailwindcss/CHANGELOG.md
Expand Up @@ -8,6 +8,7 @@
- Add support for `<script type="text/babel">` (#932)
- Show pixel equivalents in completions and hovers of the theme() helper (#935)
- Handle `style` exports condition when processing `@import`s (#934)
- Highlight `@theme` contents as a rule list (#937)

## 0.10.5

Expand Down
17 changes: 17 additions & 0 deletions packages/vscode-tailwindcss/syntaxes/at-rules.tmLanguage.json
Expand Up @@ -124,6 +124,23 @@
}
]
},
{
"begin": "(?i)((@)theme)(?=[\\s{]|/\\*|$)",
"beginCaptures": {
"1": {
"name": "keyword.control.at-rule.theme.tailwind"
},
"2": {
"name": "punctuation.definition.keyword.css"
}
},
"end": "(?<=}|;)(?!\\G)",
"patterns": [
{
"include": "source.css#rule-list"
}
]
},
{
"begin": "(?i)((@)variants)(?=[\\s{]|/\\*|$)",
"beginCaptures": {
Expand Down

0 comments on commit ecce42b

Please sign in to comment.