@@ -333,15 +333,15 @@ describe('arbitrary variants', () => {
333
333
describe ( 'variant stacking' , ( ) => {
334
334
it ( 'should stack simple variants' , ( ) => {
335
335
expect ( run ( [ 'focus:hover:flex' ] ) ) . toMatchInlineSnapshot ( `
336
- ".focus\\:hover\\:flex:hover: focus {
336
+ ".focus\\:hover\\:flex:focus:hover {
337
337
display: flex;
338
338
}"
339
339
` )
340
340
} )
341
341
342
342
it ( 'should stack arbitrary variants and simple variants' , ( ) => {
343
343
expect ( run ( [ '[&_p]:hover:flex' ] ) ) . toMatchInlineSnapshot ( `
344
- ".\\[\\&_p\\]\\:hover\\:flex:hover p {
344
+ ".\\[\\&_p\\]\\:hover\\:flex p:hover {
345
345
display: flex;
346
346
}"
347
347
` )
@@ -359,8 +359,11 @@ describe('variant stacking', () => {
359
359
360
360
it ( 'pseudo element variants are re-ordered' , ( ) => {
361
361
expect ( run ( [ 'before:hover:flex' , 'hover:before:flex' ] ) ) . toMatchInlineSnapshot ( `
362
- ".before\\:hover\\:flex:hover: before {
362
+ ".before\\:hover\\:flex:before {
363
363
content: var(--tw-content);
364
+ }
365
+
366
+ .before\\:hover\\:flex:before:hover {
364
367
display: flex;
365
368
}
366
369
@@ -592,26 +595,26 @@ describe('sorting', () => {
592
595
) ,
593
596
) ,
594
597
) . toMatchInlineSnapshot ( `
595
- ".flex {
596
- display: flex;
597
- }
598
+ ".flex {
599
+ display: flex;
600
+ }
598
601
599
- .hover\\:flex:hover {
600
- display: flex;
601
- }
602
+ .hover\\:flex:hover {
603
+ display: flex;
604
+ }
602
605
603
- .focus\\:flex:focus {
604
- display: flex;
605
- }
606
+ .focus\\:flex:focus {
607
+ display: flex;
608
+ }
606
609
607
- .hover\\:focus\\:flex:focus: hover {
608
- display: flex;
609
- }
610
+ .hover\\:focus\\:flex:hover:focus {
611
+ display: flex;
612
+ }
610
613
611
- .disabled\\:flex:disabled {
612
- display: flex;
613
- }"
614
- ` )
614
+ .disabled\\:flex:disabled {
615
+ display: flex;
616
+ }"
617
+ ` )
615
618
} )
616
619
617
620
// TODO: Extend this test with user-defined variants to ensure they are sorted
@@ -651,39 +654,39 @@ describe('sorting', () => {
651
654
display: flex;
652
655
}
653
656
654
- .group-hover\\:peer-hover\\:flex:is(:where(.peer ):hover ~ *):is(:where(.group ):hover *) {
657
+ .group-hover\\:peer-hover\\:flex:is(:where(.group ):hover *):is(:where(.peer ):hover ~ *) {
655
658
display: flex;
656
659
}
657
660
658
- .peer-hover\\:group-hover\\:flex:is(:where(.group ):hover *):is(:where(.peer ):hover ~ *) {
661
+ .peer-hover\\:group-hover\\:flex:is(:where(.peer ):hover ~ *):is(:where(.group ):hover *) {
659
662
display: flex;
660
663
}
661
664
662
- .group-focus\\:peer-hover\\:flex:is(:where(.peer):hover ~ *):is(:where(.group):focus *) {
665
+ .group-focus\\:peer-hover\\:flex:is(:where(.group):focus *):is(:where(.peer):hover ~ *) {
663
666
display: flex;
664
667
}
665
668
666
- .peer-hover\\:group-focus\\:flex:is(:where(.group):focus *):is(:where(.peer):hover ~ *) {
669
+ .peer-hover\\:group-focus\\:flex:is(:where(.peer):hover ~ *):is(:where(.group):focus *) {
667
670
display: flex;
668
671
}
669
672
670
673
.peer-focus\\:flex:is(:where(.peer):focus ~ *) {
671
674
display: flex;
672
675
}
673
676
674
- .group-hover\\:peer-focus\\:flex:is(:where(.peer):focus ~ *):is(:where(.group):hover *) {
677
+ .group-hover\\:peer-focus\\:flex:is(:where(.group):hover *):is(:where(.peer):focus ~ *) {
675
678
display: flex;
676
679
}
677
680
678
- .peer-focus\\:group-hover\\:flex:is(:where(.group):hover *):is(:where(.peer):focus ~ *) {
681
+ .peer-focus\\:group-hover\\:flex:is(:where(.peer):focus ~ *):is(:where(.group):hover *) {
679
682
display: flex;
680
683
}
681
684
682
- .group-focus\\:peer-focus\\:flex:is(:where(.peer ):focus ~ *):is(:where(.group ):focus *) {
685
+ .group-focus\\:peer-focus\\:flex:is(:where(.group ):focus *):is(:where(.peer ):focus ~ *) {
683
686
display: flex;
684
687
}
685
688
686
- .peer-focus\\:group-focus\\:flex:is(:where(.group ):focus *):is(:where(.peer ):focus ~ *) {
689
+ .peer-focus\\:group-focus\\:flex:is(:where(.peer ):focus ~ *):is(:where(.group ):focus *) {
687
690
display: flex;
688
691
}
689
692
0 commit comments