-
-
Notifications
You must be signed in to change notification settings - Fork 779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(preset-mini): Add support for peer and group variants on aria-* variants to Preset-Mini #3692
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for unocss ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
@Johnkat-Mj Can you add some test cases? |
@zyyv Can you guide me through this? |
5eaa5ba
to
822d829
Compare
Like this unocss/test/assets/preset-mini-targets.ts Lines 1176 to 1177 in 5ae78df
Add your test cases, update the snapshot and check it right? |
This pull request enable the use of peer and group selectors in conjunction with ara-* variants ( #3691 )
This will provide the ability to achieve styles like:
peer-aria-expanded:bg-red: Applies a red background to an element when its peer element has the aria-expanded attribute set to true.
group-aria-expanded-p-4: Adds a padding of 4 units to elements within a group when a group member has the aria-expanded attribute set to true.
Example
In this example, the
rotate-180
will be applied to the span element when the group member (button) has the aria-expanded attribute set to true.