How can I nested groups without conflicting each others style in Twind? #61
-
Currently, Tailwind doesn't support nested groups, a couple of discussions are going on here
I've found a plugin to solve this, so the syntax becomes https://github.com/ErickTamayo/tailwindcss-named-groups However, I don't know how to implement this in twind's plugin system. 😭😢 How can I temporarily add named groups in twind? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Sounds a like a very good use case that can be solved with twind. Could you please add an issue with an example that shows the problem and how it could be solved using named groups – maybe with a example as well. That would help to discuss an API and its impact. I think this would be a great addition! |
Beta Was this translation helpful? Give feedback.
-
So it looks like we'd need to generates some CSS like this but with variable depth:
It is quite an interesting problem for sure! Not 100% sure if this could be done by a plugin with Twind as they exist currently because we are talking about a combination of a variant with a directive i.e. I haven't tried anything out yet though. Will have a think about it some more, if you come up with anything feel free to create a PR or issue with your implementation! |
Beta Was this translation helpful? Give feedback.
-
Created an issue to track this: #74 |
Beta Was this translation helpful? Give feedback.
-
This is supported with v0.14.4: https://twind.dev/handbook/extended-functionality.html#variants |
Beta Was this translation helpful? Give feedback.
This is supported with v0.14.4: https://twind.dev/handbook/extended-functionality.html#variants