Skip to content

The has- variant does not work as expected with named groups (group/{name}) #17314

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

Open
alb-lv opened this issue Mar 21, 2025 · 0 comments
Open

Comments

@alb-lv
Copy link

alb-lv commented Mar 21, 2025

What version of Tailwind CSS are you using?

v4.0.3

What build tool (or framework if it abstracts the build tool) are you using?

Tailwind Play (https://play.tailwindcss.com/)

What version of Node.js are you using?

n/a

What browser are you using?

Firefox DevEdition 137.0b8

What operating system are you using?

macOS 15.3.2

Describe your issue

<div className="group/test">
  <input type="checkbox" />

  <!-- This changes its state based on the condition of the checkbox -->
  <div className="group-has-checked/test:hidden">Checked</div>

  <!-- This always renders regardless of checkbox state -->
  <div className="not-group-has-checked/test:hidden">Not checked</div>

  <!-- Alternative group/{name} syntax to the above examples -->
  <div className="group/test-has-checked:hidden">Checked</div>
  <div className="not-group/test-has-checked:hidden">Not checked</div>

</div>
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

No branches or pull requests

1 participant