-
I've found that combining <div class="peer" data-foo>this is a peer with a data attribute</div>
<div class="group">
<div class="group-peer-data-foo:bg-green-500"">this should be green</div>
</div> You can also use a named group: <div class="peer" data-foo>this is a peer with a data attribute</div>
<div class="group/mygroup">
<div class="group-peer-data-foo/mygroup:bg-green-500"">this should be green</div>
</div> My question though, is: can you also combine this with a named peer? This (and several variations on it) don't work: <div class="peer/mypeer" data-foo>this is a peer with a data attribute</div>
<div class="group/mygroup">
<div class="group-peer-data-foo/mygroup/mypeer:bg-green-500"">this should be green</div>
</div> Playground link: https://play.tailwindcss.com/yGQ6ghZChV Thank you! |
Beta Was this translation helpful? Give feedback.
Answered by
wongjn
Apr 21, 2025
Replies: 1 comment 1 reply
-
No, I think in Tailwind's fundamental class syntax, there is only "space" for one modifier. You can work-around this limitation use arbitrary syntax though: https://play.tailwindcss.com/hDuyJKKWx8 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
n3dst4
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No, I think in Tailwind's fundamental class syntax, there is only "space" for one modifier. You can work-around this limitation use arbitrary syntax though: https://play.tailwindcss.com/hDuyJKKWx8