Next.js Discord

Discord Forum

Problem with pure selectors tailwind.

Unanswered
American black bear posted this in #help-forum
Open in Discord
American black bearOP
Hello, i have a project with Next 14, Next UI and Tailwind.

When i try to use &913086567042674719 utilities on a css module, it gives me this error =

Syntax error: Selector ":root,.light,[data-theme="light"]" is not pure (pure selectors must contain at least one local class or id) > 1 | <@&913086567042674719> utilities;

I left attached two pictures with my tailwind config and my global.css

18 Replies

iirc i don't think you can use :root with css module, so just use normal css
American black bearOP
I have another project with next and i don't have problems with using tailwind utilities :/
do you use .module.css?
American black bearOP
Yes
and in other?
American black bearOP
Yes, both
o.O and using :root on both?
wait your library must be adding it
American black bearOP
Im not sure what :root is. The only config i always do is just install tailwind and in the global css import it
and your other project has this "nextui"?
American black bearOP
NO
No*
Next UI is the problem ?
something in that package doesn't like css modules ig
American black bearOP
😦
I will test it withouth it
@riský I just confirmed it, nextUI is the problem. I hope to find a solution.
@American black bear <@657067112434499595> I just confirmed it, nextUI is the problem. I hope to find a solution.
just checking, have you found anything interesting around this?