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

[JIT] group variants like group-hover not working #14

Open
Kuirak opened this issue Apr 19, 2021 · 2 comments
Open

[JIT] group variants like group-hover not working #14

Kuirak opened this issue Apr 19, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Kuirak
Copy link

Kuirak commented Apr 19, 2021

Hello,

group variants like group-hover or group-focus are generating wrong css with tailwindcss-theme-variants plugin.
I don't know if it is a bug in this repo or in tailwindcss JIT bug so I will cross post it

Here is a reproduction repo:
https://github.com/Kuirak/jit-tailwindcss-theme-variants/

Expected Output:

:root.dark-theme .dark\:group:hover .dark\:group-hover\:bg-amber-300 {
	--tw-bg-opacity: 1;
	background-color: rgba(252, 211, 77, var(--tw-bg-opacity));
}

Output

:root.dark-theme .dark\:group:hover .group-hover\:bg-teal-300 {
	--tw-bg-opacity: 1;
	background-color: rgba(94, 234, 212, var(--tw-bg-opacity));
}

:root.dark-theme .dark\:group:hover .group-hover\:bg-amber-300 {
	--tw-bg-opacity: 1;
	background-color: rgba(252, 211, 77, var(--tw-bg-opacity));
}
@JNavith
Copy link
Owner

JNavith commented Apr 20, 2021

This is within this plugin's realm to fix. That'll be a TODO.

It shouldn't be that hard to solve but might be a breaking change, so I might bundle it up with the other changes I have planned for 2.0.

@Kuirak
Copy link
Author

Kuirak commented Apr 21, 2021

Good to hear, do you have a rough ETA of 2.0?

After thinking about it some more I think the expected selector output should be:

:root.dark-theme .dark:group:hover .dark\:group-hover\:bg-amber-300

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants