can I use has selector to look for any new css classes that were added dynamically ?
I wanted to use
:has
selector to look for a class named dark-mode
that is added dynamically in react , so I was wondering if I can do something like body:has('dark-mode'){background:black,color:white}3 Replies
The question I have is: where are you setting .dark-mode
i will show u
in the header component
it has a button
smth like this
As long as .dark-mode is a child of the body, which it clearly is, then it works