You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tailwind already has group for styling children based on the parent state. It already has peer for styling elements based on the state of sibling nodes. But it doesn't have a member selector/variant for styling a parent based on child state.
Tailwind has the following option for this currently: has-[.member:focus]:border, has-[.member:hover]:border- Styles parent with border if any child with the member class is focused or hovered.
It would be nice to have a built-in member variant similar to group and peer.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Tailwind already has
group
for styling children based on the parent state. It already haspeer
for styling elements based on the state of sibling nodes. But it doesn't have amember
selector/variant for styling a parent based on child state.Tailwind has the following option for this currently:
has-[.member:focus]:border
,has-[.member:hover]:border
- Styles parent withborder
if any child with themember
class is focused or hovered.It would be nice to have a built-in
member
variant similar togroup
andpeer
.This is what I've got, but it doesn't support named members like
member/name
.Beta Was this translation helpful? Give feedback.
All reactions