Skip to content

Tailwind CSSv3.0.23+ doesn't properly support variants #18

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
benlei opened this issue Apr 25, 2022 · 5 comments
Closed

Tailwind CSSv3.0.23+ doesn't properly support variants #18

benlei opened this issue Apr 25, 2022 · 5 comments

Comments

@benlei
Copy link

benlei commented Apr 25, 2022

What version of @tailwindcss/line-clamp are you using?

v0.3.1

What version of Node.js are you using?

v16.13.0

What browser are you using?

Chrome

What operating system are you using?

macOS

Reproduction repository

N/A

Describe your issue

Cont of #16

@adamwathan the issue is that varaints aren't working (aren't generated) with the above versions (with Tailwind CSSv3.0.23) I mentioned. Tailwind renamed the variants field to addVariant, which is why the existing variant field won't work in getting the the variant CSS code generated.

@adamwathan
Copy link
Member

You gotta provide a reproduction man otherwise I have no idea what you are trying to tell me. variants was not renamed to addVariant, those are two totally different functions.

Line clamp utilities do support variants in Tailwind v3, try hover:line-clamp-2 and it will just work, no variants configuration necessary because every variant works everywhere in v3. So you’re gonna need to provide a reproduction for me to understand what you actually mean when you say “not working” because it does work 😅

@adamwathan
Copy link
Member

Here's a demo where you can see Tailwind v3.0.24 + the line-clamp plugin with variants working out of the box with no configuration necessary:

https://play.tailwindcss.com/V25ihYtsG6

So what is the actual problem you have in your project that isn't working? Happy to help with that but you have to tell me what it is you know? ❤️

@adamwathan
Copy link
Member

Going to close this, feel free to open a discussion if you need help with something specific though, always happy to help.

@benlei
Copy link
Author

benlei commented Apr 27, 2022

@adamwathan see https://play.tailwindcss.com/91ENbypV2a

hover:line-clamp-[3]

is the offending bit

@adamwathan
Copy link
Member

Hey thanks for the extra detail! So the issue isn't actually anything to do with variants, it's that the latest release of the line-clamp plugin doesn't support arbitrary values:

https://play.tailwindcss.com/91ENbypV2a

The good news is support has been added for this:

#10

...it's just that we haven't cut a release. Made a note to cut one tomorrow though!

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

2 participants