Skip to content
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

Specific group-has- utility with hyphenated modifier doesn't render CSS #13137

Closed
benface opened this issue Mar 7, 2024 · 3 comments · Fixed by #13303
Closed

Specific group-has- utility with hyphenated modifier doesn't render CSS #13137

benface opened this issue Mar 7, 2024 · 3 comments · Fixed by #13303
Assignees

Comments

@benface
Copy link
Contributor

benface commented Mar 7, 2024

What version of Tailwind CSS are you using?

v3.4.1

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

Tailwind Play

What version of Node.js are you using?

Tailwind Play

What browser are you using?

Any

What operating system are you using?

Any

Reproduction URL

https://play.tailwindcss.com/dVDTGsBgzE

Describe your issue

The class group-has-[[data-test=test]]/test-modifier:block doesn't render any CSS, though it appears valid (at least according to the intellisense). Interestingly, if you do any of the following, then it works:

  • remove the hyphen from the modifier (e.g. /test instead of /test-modifier)
  • remove the value from the data attribute (e.g. [data-test])
  • add any selector after the data attribute one (e.g. [data-test=test]:checked)

CleanShot 2024-03-07 at 16 12 49@2x

@RobinMalfait RobinMalfait self-assigned this Mar 11, 2024
@RobinMalfait
Copy link
Contributor

Hey!

Right now the has variant doesn't accept a modifier (what do you expect it to do?). In case of group-has-*/modifier-name the modifier-name belongs to the group part so that you can use a different group with a different name.

What is the goal of the modifier in this case?

@benface benface changed the title Specific has- utility with hyphenated modifier doesn't render CSS Specific group-has- utility with hyphenated modifier doesn't render CSS Mar 11, 2024
@benface
Copy link
Contributor Author

benface commented Mar 11, 2024

Sorry @RobinMalfait, I simplified the reproducible case too much. 😅 Updated my first post.

@RobinMalfait
Copy link
Contributor

This should be fixed by #13303, and will be available in the next release.

You can already try it by using the insiders build npm install tailwindcss@insiders.

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 a pull request may close this issue.

2 participants