@@ -616,6 +616,69 @@ test('classes in the same arbitrary variant should not be prefixed', () => {
616616 } )
617617} )
618618
619+ it ( 'should support aria variants' , ( ) => {
620+ let config = {
621+ content : [
622+ {
623+ raw : html `
624+ <div>
625+ <div class= "aria-checked:underline" > </ div>
626+ <div class= "aria-[sort=ascending]:underline" > </ div>
627+ <div class= "group-aria-checked:underline" > </ div>
628+ <div class= "peer-aria-checked:underline" > </ div>
629+ <div class= "group-aria-checked/foo:underline" > </ div>
630+ <div class= "peer-aria-checked/foo:underline" > </ div>
631+ <div class= "group-aria-[sort=ascending]:underline" > </ div>
632+ <div class= "peer-aria-[sort=ascending]:underline" > </ div>
633+ <div class= "group-aria-[sort=ascending]/foo:underline" > </ div>
634+ <div class= "peer-aria-[sort=ascending]/foo:underline" > </ div>
635+ </ div>
636+ ` ,
637+ } ,
638+ ] ,
639+ corePlugins : { preflight : false } ,
640+ }
641+
642+ let input = css `
643+ @tailwind utilities;
644+ `
645+
646+ return run ( input , config ) . then ( ( result ) => {
647+ expect ( result . css ) . toMatchFormattedCss ( css `
648+ .aria-checked\:underline [aria-checked = 'true' ] {
649+ text-decoration-line : underline;
650+ }
651+ .aria-\[sort\=ascending\]\:underline [aria-sort = 'ascending' ] {
652+ text-decoration-line : underline;
653+ }
654+ .group [aria-checked = 'true' ] .group-aria-checked\:underline {
655+ text-decoration-line : underline;
656+ }
657+ .group\/foo [aria-checked = 'true' ] .group-aria-checked\/foo\:underline {
658+ text-decoration-line : underline;
659+ }
660+ .group [aria-sort = 'ascending' ] .group-aria-\[sort\=ascending\]\:underline {
661+ text-decoration-line : underline;
662+ }
663+ .group\/foo [aria-sort = 'ascending' ] .group-aria-\[sort\=ascending\]\/foo\:underline {
664+ text-decoration-line : underline;
665+ }
666+ .peer [aria-checked = 'true' ] ~ .peer-aria-checked\:underline {
667+ text-decoration-line : underline;
668+ }
669+ .peer\/foo [aria-checked = 'true' ] ~ .peer-aria-checked\/foo\:underline {
670+ text-decoration-line : underline;
671+ }
672+ .peer [aria-sort = 'ascending' ] ~ .peer-aria-\[sort\=ascending\]\:underline {
673+ text-decoration-line : underline;
674+ }
675+ .peer\/foo [aria-sort = 'ascending' ] ~ .peer-aria-\[sort\=ascending\]\/foo\:underline {
676+ text-decoration-line : underline;
677+ }
678+ ` )
679+ } )
680+ } )
681+
619682it ( 'should support supports' , ( ) => {
620683 let config = {
621684 theme : {
0 commit comments