tailwindcss icon indicating copy to clipboard operation
tailwindcss copied to clipboard

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

Open olets opened this issue 1 year ago • 3 comments

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 avatar Sep 11 '24 18:09 olets

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

adamwathan avatar Sep 18 '24 13:09 adamwathan

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

olets avatar Sep 18 '24 18:09 olets

Hey!

This has been fixed a while ago. Thanks!

RobinMalfait avatar Jan 29 '25 23:01 RobinMalfait