Replies: 3 comments 2 replies
-
Yeah have to define manually, we define all the built-in ones manually too. Agree would be cool to figure out a way to make it a bit more automatic if possible. |
Beta Was this translation helpful? Give feedback.
0 replies
-
From the sources, looks like you can add another variant for peer and group: addVariant("group-expanded", `:merge(.group)[aria-expanded="true"] &`)
addVariant("peer-expanded", `:merge(.peer)[aria-expanded="true"] ~ &`); It's not automagically, but it's only 2 more lines to add to your plugin. |
Beta Was this translation helpful? Give feedback.
1 reply
-
@adamwathan @TastyPi I always add a small utility function to do that in one go: const addVariantWithStates = (variant, selector) => {
addVariant(variant, `&${selector}`)
addVariant(`group-${variant}`, `:merge(.group)${selector} &`)
addVariant(`peer-${variant}`, `:merge(.peer)${selector} ~ &`)
} |
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.
-
It seems the
peer
andgroup
modifiers don't work with custom variants (unless I'm missing something?).For example, it would be nice to be able to do this:
but that does not currently seem possible without defining
peer-expanded
manually.Beta Was this translation helpful? Give feedback.
All reactions