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

[v3 on Tailwind Play] using a class with a variant generates css for the variant-free class too #14401

Open
olets opened this issue Sep 11, 2024 · 3 comments

Comments

@olets
Copy link

olets commented Sep 11, 2024

What version of Tailwind CSS are you using?

3.4.11

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

play's

What version of Node.js are you using?

play's

What browser are you using?

Chrome, Firefox

What operating system are you using?

macOS

Reproduction URL

https://play.tailwindcss.com/KnbS12ekWQ

Describe your issue

Given the html pseudocode <div class="variant:utility">, Tailwind is generating the CSS for .variant\:utility and the CSS for .utility.

@olets olets changed the title [v3] variant-less class generated when only variant-ific classes are used [v3] using a class with a variant generates css for the variant-free class too Sep 11, 2024
@adamwathan
Copy link
Member

Hey thanks! Just looked into this and it doesn't seem to happen in real projects, only in Tailwind Play. Will keep this open so we don't forget to fix it in Play but in my testing at least only the actual classes are generated in real projects 👍

image

@olets
Copy link
Author

olets commented Sep 18, 2024

Thanks confirming that with this stackblitz https://stackblitz.com/edit/tailwindcss-issues-14401?file=src%2Foutput.css&terminal=dev

@olets olets changed the title [v3] using a class with a variant generates css for the variant-free class too [Tailwind Play v3] using a class with a variant generates css for the variant-free class too Sep 18, 2024
@olets olets changed the title [Tailwind Play v3] using a class with a variant generates css for the variant-free class too [v3 on Tailwind Play] using a class with a variant generates css for the variant-free class too Sep 18, 2024
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

3 participants
@olets @adamwathan and others