News for hackers. Stuff that matters.
Re:Vanilla JavaScript support for Tailwind Plus by owebmaster on Saturday July 26, 2025 @07:35AM (#44693265)
is it possible to add the hover to the parent without also adding it to the child ?
Re:Vanilla JavaScript support for Tailwind Plus by MrJohz on Saturday July 26, 2025 @08:22AM (#44693587)
What do you mean? It's possible to apply attributes to any element in an arbitrary state: `hover:bg-black` would give an element a black background on hover. It's also apparently possible to apply attributes based on whether a state is fulfilled for a child element (i.e. the :has selector). E.g. `has-[:hover]:bg-black` would give an element a black background if any child is hovered.
Re:Vanilla JavaScript support for Tailwind Plus by owebmaster on Saturday July 26, 2025 @06:17PM (#44697358)
> What do you mean?

the second part of your answer answered it perfectly. Thanks