Add aria-current variant #9563
MichaelAllenWarner
started this conversation in
Ideas
Replies: 1 comment
-
for anyone finding this, you can use https://www.npmjs.com/package/tailwindcss-aria-attributes |
Beta Was this translation helpful? Give feedback.
0 replies
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 new built-in
aria-
variants are great!I wonder if it might make sense to add one for
aria-current
. Although it isn't a boolean attribute, it almost always functions like one in practice. What I mean is: probably ~99% of the time, a given element should either have one specific non-"false"
value (like"page"
) or have a"false"
/missing value; rarely (if ever) might an element have more than one possible non-"false"
value.So for styling purposes, a selector like
[aria-current]:not([aria-current="false"])
might suffice. (I've been using that as a custom Tailwind variant for some time now.)Beta Was this translation helpful? Give feedback.
All reactions