Skip to content

IntelliSense does not show class suggestions with selectors using square brackets #943

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kaisergeX opened this issue Apr 3, 2024 · 3 comments · Fixed by #1263
Closed
Assignees
Labels
bug Something isn't working

Comments

@kaisergeX
Copy link

What version of VS Code are you using?

v1.87.2 (Universal)

What version of Tailwind CSS IntelliSense are you using?

v0.11.60 (pre-release)

What version of Tailwind CSS are you using?

v4.0.0-alpha.11

What package manager are you using?

pnpm

What operating system are you using?

macOS

Tailwind config

None - using @tailwindcss/vite@4.0.0-alpha.11 plugin.

VS Code settings

{
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "files.associations": {
    "*.css": "tailwindcss"
  },
  "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false,
  "typescript.tsdk": "node_modules\\typescript\\lib"
}

Reproduction

<div class="[&.active]:">
  <a href="/" class="active">Home</a>
  <a href="/about">About</a>
  ...
</div>

Describe your issue

The IntelliSense does not show suggestions for classes that have custom selectors using square brackets.
eg: [&.active]:, data-[active=true]:.
image

The hover description:
image

It works fine with selectors that do not have square brackets, btw.
image

@thecrypticace thecrypticace self-assigned this Feb 12, 2025
@thecrypticace thecrypticace added the bug Something isn't working label Feb 12, 2025
@AugustoTI
Copy link

I'm suffering from the same obstacle

@nanxiaobei
Copy link

same issue with tailwindcss@4.0.8 & webstorm 2024.3.3

@thecrypticace
Copy link
Contributor

Gonna get a release out soon with this fix 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants