Skip to content

Improve Tailwind CSS regex for VSCode extension#663

Open
DianaNites wants to merge 2 commits into
DioxusLabs:mainfrom
DianaNites:patch-1
Open

Improve Tailwind CSS regex for VSCode extension#663
DianaNites wants to merge 2 commits into
DioxusLabs:mainfrom
DianaNites:patch-1

Conversation

@DianaNites

@DianaNites DianaNites commented Jul 9, 2026

Copy link
Copy Markdown

Improved regex for Tailwind CSS class support in VSCode.

Specifically, this now recognizes constructs such as below

rsx! {
  div {
    class: "bg-<autocomplete triggers>", //this worked before
    class: if truthy { "bg-<autocomplete triggers>" } else { "text-<autocomplete triggers>" }, //this newly works
    // class: "but this is excluded because its a comment", //this *stops* triggering intellisense
  }
}

edit: actually in if truthy { a } else { b }, only b will be detected by this regex, a will not match. i dont know how to fix it so whatever,

Improved regex for Tailwind CSS class support in VSCode.

Specifically, this now recognizes constructs such as

```rust
rsx! {
  div {
    class: "bg-<autocomplete triggers>",
    class: if truthy { "bg-<autocomplete triggers>" } else { "text-<autocomplete triggers>" },
    // class: "but this is excluded because its a comment",
  }
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant