@@ -333,15 +333,15 @@ describe('arbitrary variants', () => {
333333describe ( 'variant stacking' , ( ) => {
334334 it ( 'should stack simple variants' , ( ) => {
335335 expect ( run ( [ 'focus:hover:flex' ] ) ) . toMatchInlineSnapshot ( `
336- ".focus\\:hover\\:flex:hover: focus {
336+ ".focus\\:hover\\:flex:focus:hover {
337337 display: flex;
338338 }"
339339 ` )
340340 } )
341341
342342 it ( 'should stack arbitrary variants and simple variants' , ( ) => {
343343 expect ( run ( [ '[&_p]:hover:flex' ] ) ) . toMatchInlineSnapshot ( `
344- ".\\[\\&_p\\]\\:hover\\:flex:hover p {
344+ ".\\[\\&_p\\]\\:hover\\:flex p:hover {
345345 display: flex;
346346 }"
347347 ` )
@@ -359,8 +359,11 @@ describe('variant stacking', () => {
359359
360360 it ( 'pseudo element variants are re-ordered' , ( ) => {
361361 expect ( run ( [ 'before:hover:flex' , 'hover:before:flex' ] ) ) . toMatchInlineSnapshot ( `
362- ".before\\:hover\\:flex:hover: before {
362+ ".before\\:hover\\:flex:before {
363363 content: var(--tw-content);
364+ }
365+
366+ .before\\:hover\\:flex:before:hover {
364367 display: flex;
365368 }
366369
@@ -592,26 +595,26 @@ describe('sorting', () => {
592595 ) ,
593596 ) ,
594597 ) . toMatchInlineSnapshot ( `
595- ".flex {
596- display: flex;
597- }
598+ ".flex {
599+ display: flex;
600+ }
598601
599- .hover\\:flex:hover {
600- display: flex;
601- }
602+ .hover\\:flex:hover {
603+ display: flex;
604+ }
602605
603- .focus\\:flex:focus {
604- display: flex;
605- }
606+ .focus\\:flex:focus {
607+ display: flex;
608+ }
606609
607- .hover\\:focus\\:flex:focus: hover {
608- display: flex;
609- }
610+ .hover\\:focus\\:flex:hover:focus {
611+ display: flex;
612+ }
610613
611- .disabled\\:flex:disabled {
612- display: flex;
613- }"
614- ` )
614+ .disabled\\:flex:disabled {
615+ display: flex;
616+ }"
617+ ` )
615618 } )
616619
617620 // TODO: Extend this test with user-defined variants to ensure they are sorted
@@ -651,39 +654,39 @@ describe('sorting', () => {
651654 display: flex;
652655 }
653656
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 ~ *) {
655658 display: flex;
656659 }
657660
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 *) {
659662 display: flex;
660663 }
661664
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 ~ *) {
663666 display: flex;
664667 }
665668
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 *) {
667670 display: flex;
668671 }
669672
670673 .peer-focus\\:flex:is(:where(.peer):focus ~ *) {
671674 display: flex;
672675 }
673676
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 ~ *) {
675678 display: flex;
676679 }
677680
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 *) {
679682 display: flex;
680683 }
681684
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 ~ *) {
683686 display: flex;
684687 }
685688
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 *) {
687690 display: flex;
688691 }
689692
0 commit comments