You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some variants, such as group, not, has, etc. are composable, meaning that we can stack more variants after them (with a - instead of a :), e.g. has-checked.
And all those composable variants also allow arbitrary stacked variants, e.g. has-[[name=foo]:checked].
But sometimes it would be useful to be able to "compose" non-composable variants, to be more specific than the selectors that those variants generate. For instance, has-[[name=foo]:checked] could be rewritten as has-checked-[[name=foo]]. Maybe that doesn't sound super useful, but what if you had a more complex variant, like the following?
This feature request would allow writing has-clickable-[:disabled], which would be a lot DRYer than has-[:is(button,a[href],[role=button],[role=tab]):disabled].
Maybe it could even be possible to stack non-arbitrary variants (e.g. has-disabled-clickable), but let's not get ahead of ourselves. I'd be super happy with just the ability to append arbitrary variants after any existing variant. :)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Some variants, such as
group
,not
,has
, etc. are composable, meaning that we can stack more variants after them (with a-
instead of a:
), e.g.has-checked
.And all those composable variants also allow arbitrary stacked variants, e.g.
has-[[name=foo]:checked]
.But sometimes it would be useful to be able to "compose" non-composable variants, to be more specific than the selectors that those variants generate. For instance,
has-[[name=foo]:checked]
could be rewritten ashas-checked-[[name=foo]]
. Maybe that doesn't sound super useful, but what if you had a more complex variant, like the following?This feature request would allow writing
has-clickable-[:disabled]
, which would be a lot DRYer thanhas-[:is(button,a[href],[role=button],[role=tab]):disabled]
.Maybe it could even be possible to stack non-arbitrary variants (e.g.
has-disabled-clickable
), but let's not get ahead of ourselves. I'd be super happy with just the ability to append arbitrary variants after any existing variant. :)Beta Was this translation helpful? Give feedback.
All reactions