Re:Vanilla JavaScript support for Tailwind Plus
by luckylion on Saturday July 26, 2025 @04:49AM
(#44692538)
That doesn't affect the parent (.group) based on the child though.
[ Parent
| on HN ]
Re:Vanilla JavaScript support for Tailwind Plus
by MrJohz on Saturday July 26, 2025 @05:42AM
(#44692753)
No, but `group` doesn't affect the parent in Tailwind. You put `group` in the parent to mark it, and then use the `group/...` syntax to apply different properties to the child, depending on the different states of the parent. This doesn't require `:has`.
I don't think Tailwind has a built-in `:has` tool, but I suspect it would be easy to add one as a custom class.
Re:Vanilla JavaScript support for Tailwind Plus
by luckylion on Saturday July 26, 2025 @07:23AM
(#44693208)
Oh, I misunderstood the GP then, thanks for clarifying!
Re:Vanilla JavaScript support for Tailwind Plus
by omnimus on Saturday July 26, 2025 @09:09AM
(#44693819)
Tailwind has few :has tools but it’s imho terrible. They keep inflating the system to nonsense.
Re:Vanilla JavaScript support for Tailwind Plus
by reactordev on Saturday July 26, 2025 @02:42PM
(#44696147)
This.