Replies: 2 comments 2 replies
-
I've had it in my idea list for awhile to explore some sort of named group feature, like |
Beta Was this translation helpful? Give feedback.
-
Hey! Good news — we just added nested group and multiple peer support using variant modifiers in Tailwind CSS v3.2 🥳 You can read about it in our announcement blog post, but for quick reference here’s what it looks like: <div class="group/sidebar ...">
<!-- ... -->
<div class="group/navitem ...">
<a
href="#"
class="opacity-50 group-hover/sidebar:opacity-75 group-hover/navitem:bg-black/75"
>
<!-- ... -->
</a>
</div>
<!-- ... -->
</div> This lets you give each group a clear name that makes sense for that context on the fly, and Tailwind will generate the necessary CSS to make it work. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Everyone,
Currently, there is no way of distinguishing nested
group-hovers
for nested elements that require different hover needs. I'm wondering if there's anything in the pipeline that will address this?Looking around online, it seems others have this problem as well and there is even an npm package dedicated to this:
https://www.npmjs.com/package/tailwindcss-nested-groups
Would love to chat about this.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions