Replies: 1 comment 1 reply
-
There is the empty |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The
group
selector supports styling a descendant based on the parent's state (https://tailwindcss.com/docs/hover-focus-and-other-states#styling-based-on-parent-state).It also supports differentiating groups (https://tailwindcss.com/docs/hover-focus-and-other-states#differentiating-nested-groups) and arbitrary modifiers (https://tailwindcss.com/docs/hover-focus-and-other-states#arbitrary-groups).
However, it does not support styling a descendant based solely on the group selector in any state (not a specific state).
The use case for this is a component can be nested in another component, and only in that case I would like to apply conditional values.
For example, ideally the following would work:
This is achievable with a custom selector:
Would it be reasonable to allow the
group:..
orgroup/{name}:...
prefix to be used to apply styles to a descendant only when nested within that group (component)?Beta Was this translation helpful? Give feedback.
All reactions