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

compound variants not work with responsive values #52

Open
mohammadgarmroodi opened this issue May 21, 2023 · 9 comments
Open

compound variants not work with responsive values #52

mohammadgarmroodi opened this issue May 21, 2023 · 9 comments
Labels
bug Something isn't working cant reproduce This bug cannot be reproduced responsive Issues related to responsive variants

Comments

@mohammadgarmroodi
Copy link

Describe the bug
compound variants does not support responsive values

To Reproduce
https://stackblitz.com/edit/vite-react-tailwind-dtjgiu?file=src%2FApp.jsx

@mohammadgarmroodi mohammadgarmroodi added the bug Something isn't working label May 21, 2023
@mskelton mskelton added the responsive Issues related to responsive variants label Oct 28, 2023
@sebpowell
Copy link

I'm running into this issue too – the classes are properly applied, but the Tailwind compiler doesn't seem to pick them up so the styles aren't generated.

@raminrez
Copy link

raminrez commented Dec 5, 2023

@mohammadgarmroodi
I have forked your example and updated the package (V0.1.18) to the latest version, but I can't see the problem. Can you double-check?

Here is my fork:
https://stackblitz.com/edit/vite-react-tailwind-rucbt4?file=src%2FApp.jsx

@mskelton mskelton added the cant reproduce This bug cannot be reproduced label Jan 18, 2024
@mskelton
Copy link
Collaborator

Closing due to lack of reproducability and response.

@mskelton mskelton closed this as not planned Won't fix, can't repro, duplicate, stale Jan 18, 2024
@Sliov
Copy link

Sliov commented Mar 14, 2024

Can we reopen this? We merged from cva to tailwind-variants and use compoundVariants quite a lot.

Here's an repro using the latest tailwind-variants version:

https://codesandbox.io/p/sandbox/tailwind-variants-example-forked-4tw75x?file=%2Fsrc%2FApp.tsx%3A39%2C9

@Gomah
Copy link
Contributor

Gomah commented Mar 19, 2024

Yeah, it looks like the logic from the regular variants is missing/not implemented for compoundVariants.

cc @mskelton

@mskelton mskelton reopened this Mar 20, 2024
@Sliov
Copy link

Sliov commented Mar 20, 2024

@mskelton, @jrgarciadev

Is it intended to work or it is a limitation like it is with Panda CSS?

When using compoundVariants in the recipe, you're not able to use responsive values in the variants.

To be fair, I think implementing this logic will impact performance as it needs to loop against the variants and the responsive screens?

@Jbmanllr
Copy link

Jbmanllr commented May 3, 2024

Wondering as well if it's intended. Guys what's your workarounds?

@Jbmanllr
Copy link

Jbmanllr commented May 4, 2024

To be more specific, compounded values are working, but are not responsive, it apply only to initial value.

@flozero
Copy link

flozero commented Jun 6, 2024

Same issue here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cant reproduce This bug cannot be reproduced responsive Issues related to responsive variants
Projects
None yet
Development

No branches or pull requests

8 participants