4 ms·
is it possible to add the hover to the parent without also adding it to the child ?
by owebmaster 1y ago
is it possible to add the hover to the parent without also adding it to the child ?
- MrJohz 1y agoWhat 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.
- owebmaster 1y ago> What do you mean? the second part of your answer answered it perfectly. Thanks