Skip to content

Commit 100f852

Browse files
committed
update tests
1 parent 2c6c3f3 commit 100f852

File tree

5 files changed

+164
-1330
lines changed

5 files changed

+164
-1330
lines changed

packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ exports[`\`@import 'tailwindcss'\` is replaced with the generated CSS 1`] = `
455455
color: inherit;
456456
-webkit-text-decoration: inherit;
457457
-webkit-text-decoration: inherit;
458+
-webkit-text-decoration: inherit;
458459
text-decoration: inherit;
459460
}
460461

packages/tailwindcss/src/compat/plugin-api.test.ts

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,11 +1592,7 @@ describe('addVariant', () => {
15921592
.potato\\:flex:large-potato {
15931593
display: flex;
15941594
}
1595-
}
1596-
}
15971595
1598-
@media (width <= 400px) {
1599-
@supports (font: bold) {
16001596
.potato\\:underline:large-potato {
16011597
text-decoration-line: underline;
16021598
}
@@ -1840,19 +1836,7 @@ describe('matchVariant', () => {
18401836

18411837
expect(optimizeCss(compiled).trim()).toMatchInlineSnapshot(`
18421838
"@layer utilities {
1843-
.alphabet-d\\:underline[data-order="1"] {
1844-
text-decoration-line: underline;
1845-
}
1846-
1847-
.alphabet-a\\:underline[data-order="2"] {
1848-
text-decoration-line: underline;
1849-
}
1850-
1851-
.alphabet-c\\:underline[data-order="3"] {
1852-
text-decoration-line: underline;
1853-
}
1854-
1855-
.alphabet-b\\:underline[data-order="4"] {
1839+
.alphabet-d\\:underline[data-order="1"], .alphabet-a\\:underline[data-order="2"], .alphabet-c\\:underline[data-order="3"], .alphabet-b\\:underline[data-order="4"] {
18561840
text-decoration-line: underline;
18571841
}
18581842
}"
@@ -2059,9 +2043,7 @@ describe('matchVariant', () => {
20592043
order: 3;
20602044
}
20612045
}
2062-
}
20632046
2064-
@media (width >= 100px) {
20652047
@media (width <= 300px) {
20662048
.testmin-\\[100px\\]\\:testmax-\\[300px\\]\\:order-4 {
20672049
order: 4;
@@ -2116,11 +2098,7 @@ describe('matchVariant', () => {
21162098
text-decoration-line: underline;
21172099
}
21182100
}
2119-
}
2120-
}
21212101
2122-
@media (width >= 100px) {
2123-
@media (width <= 200px) {
21242102
.testmin-\\[100px\\]\\:testmax-\\[200px\\]\\:focus\\:underline:focus {
21252103
text-decoration-line: underline;
21262104
}
@@ -2245,9 +2223,7 @@ describe('matchVariant', () => {
22452223
text-decoration-line: underline;
22462224
}
22472225
}
2248-
}
22492226
2250-
@media (width <= 400px) {
22512227
@media (width >= 200px) {
22522228
.testmax-\\[400px\\]\\:testmin-\\[200px\\]\\:underline {
22532229
text-decoration-line: underline;
@@ -2261,9 +2237,7 @@ describe('matchVariant', () => {
22612237
text-decoration-line: underline;
22622238
}
22632239
}
2264-
}
22652240
2266-
@media (width <= 300px) {
22672241
@media (width >= 200px) {
22682242
.testmax-\\[300px\\]\\:testmin-\\[200px\\]\\:underline {
22692243
text-decoration-line: underline;
@@ -2870,11 +2844,7 @@ describe('addUtilities()', () => {
28702844

28712845
expect(optimizeCss(compiled.build(['form-input', 'lg:form-textarea'])).trim())
28722846
.toMatchInlineSnapshot(`
2873-
".form-input {
2874-
background-color: red;
2875-
}
2876-
2877-
.form-input::placeholder {
2847+
".form-input, .form-input::placeholder {
28782848
background-color: red;
28792849
}
28802850
@@ -3610,9 +3580,7 @@ describe('matchUtilities()', () => {
36103580
--foo: 12px;
36113581
display: flex;
36123582
}
3613-
}
36143583
3615-
@media (width >= 1024px) {
36163584
.lg\\:foo-bar {
36173585
--foo: bar;
36183586
display: flex;

packages/tailwindcss/src/index.test.ts

Lines changed: 10 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -511,9 +511,7 @@ describe('variant stacking', () => {
511511
.before\\:hover\\:flex:before:hover {
512512
display: flex;
513513
}
514-
}
515514
516-
@media (hover: hover) {
517515
.hover\\:before\\:flex:hover:before {
518516
content: var(--tw-content);
519517
display: flex;
@@ -914,32 +912,14 @@ describe('sorting', () => {
914912
.peer-hover\\:flex:is(:where(.peer):hover ~ *) {
915913
display: flex;
916914
}
917-
}
918915
919-
@media (hover: hover) {
920916
@media (hover: hover) {
921-
.group-hover\\:peer-hover\\:flex:is(:where(.group):hover *):is(:where(.peer):hover ~ *) {
917+
.group-hover\\:peer-hover\\:flex:is(:where(.group):hover *):is(:where(.peer):hover ~ *), .peer-hover\\:group-hover\\:flex:is(:where(.peer):hover ~ *):is(:where(.group):hover *) {
922918
display: flex;
923919
}
924920
}
925-
}
926921
927-
@media (hover: hover) {
928-
@media (hover: hover) {
929-
.peer-hover\\:group-hover\\:flex:is(:where(.peer):hover ~ *):is(:where(.group):hover *) {
930-
display: flex;
931-
}
932-
}
933-
}
934-
935-
@media (hover: hover) {
936-
.group-focus\\:peer-hover\\:flex:is(:where(.group):focus *):is(:where(.peer):hover ~ *) {
937-
display: flex;
938-
}
939-
}
940-
941-
@media (hover: hover) {
942-
.peer-hover\\:group-focus\\:flex:is(:where(.peer):hover ~ *):is(:where(.group):focus *) {
922+
.group-focus\\:peer-hover\\:flex:is(:where(.group):focus *):is(:where(.peer):hover ~ *), .peer-hover\\:group-focus\\:flex:is(:where(.peer):hover ~ *):is(:where(.group):focus *) {
943923
display: flex;
944924
}
945925
}
@@ -949,22 +929,12 @@ describe('sorting', () => {
949929
}
950930
951931
@media (hover: hover) {
952-
.group-hover\\:peer-focus\\:flex:is(:where(.group):hover *):is(:where(.peer):focus ~ *) {
953-
display: flex;
954-
}
955-
}
956-
957-
@media (hover: hover) {
958-
.peer-focus\\:group-hover\\:flex:is(:where(.peer):focus ~ *):is(:where(.group):hover *) {
932+
.group-hover\\:peer-focus\\:flex:is(:where(.group):hover *):is(:where(.peer):focus ~ *), .peer-focus\\:group-hover\\:flex:is(:where(.peer):focus ~ *):is(:where(.group):hover *) {
959933
display: flex;
960934
}
961935
}
962936
963-
.group-focus\\:peer-focus\\:flex:is(:where(.group):focus *):is(:where(.peer):focus ~ *) {
964-
display: flex;
965-
}
966-
967-
.peer-focus\\:group-focus\\:flex:is(:where(.peer):focus ~ *):is(:where(.group):focus *) {
937+
.group-focus\\:peer-focus\\:flex:is(:where(.group):focus *):is(:where(.peer):focus ~ *), .peer-focus\\:group-focus\\:flex:is(:where(.peer):focus ~ *):is(:where(.group):focus *) {
968938
display: flex;
969939
}
970940
@@ -2198,11 +2168,7 @@ describe('plugins', () => {
21982168

21992169
expect(optimizeCss(compiled).trim()).toMatchInlineSnapshot(`
22002170
"@layer utilities {
2201-
.rtl\\:flex:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
2202-
display: flex;
2203-
}
2204-
2205-
.dark\\:flex:is([data-theme="dark"] *) {
2171+
.rtl\\:flex:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *), .dark\\:flex:is([data-theme="dark"] *) {
22062172
display: flex;
22072173
}
22082174
@@ -2386,11 +2352,7 @@ describe('@variant', () => {
23862352

23872353
expect(optimizeCss(compiled).trim()).toMatchInlineSnapshot(`
23882354
"@layer utilities {
2389-
.group-selected\\:underline:is(:where(.group)[data-selected] *) {
2390-
text-decoration-line: underline;
2391-
}
2392-
2393-
.selected\\:underline[data-selected] {
2355+
.group-selected\\:underline:is(:where(.group)[data-selected] *), .selected\\:underline[data-selected] {
23942356
text-decoration-line: underline;
23952357
}
23962358
}"
@@ -2414,11 +2376,7 @@ describe('@variant', () => {
24142376

24152377
expect(optimizeCss(compiled).trim()).toMatchInlineSnapshot(`
24162378
"@layer utilities {
2417-
.group-hocus\\:underline:is(:is(:where(.group):hover, :where(.group):focus) *) {
2418-
text-decoration-line: underline;
2419-
}
2420-
2421-
.hocus\\:underline:hover, .hocus\\:underline:focus {
2379+
.group-hocus\\:underline:is(:is(:where(.group):hover, :where(.group):focus) *), .hocus\\:underline:hover, .hocus\\:underline:focus {
24222380
text-decoration-line: underline;
24232381
}
24242382
}"
@@ -2445,11 +2403,7 @@ describe('@variant', () => {
24452403

24462404
expect(optimizeCss(compiled).trim()).toMatchInlineSnapshot(`
24472405
"@layer utilities {
2448-
.group-hocus\\:underline:is(:where(.group):hover *), .group-hocus\\:underline:is(:where(.group):focus *) {
2449-
text-decoration-line: underline;
2450-
}
2451-
2452-
.hocus\\:underline:hover, .hocus\\:underline:focus {
2406+
.group-hocus\\:underline:is(:where(.group):hover *), .group-hocus\\:underline:is(:where(.group):focus *), .hocus\\:underline:hover, .hocus\\:underline:focus {
24532407
text-decoration-line: underline;
24542408
}
24552409
}"
@@ -2583,13 +2537,7 @@ describe('@variant', () => {
25832537
expect(optimizeCss(compiled).trim()).toMatchInlineSnapshot(`
25842538
"@layer utilities {
25852539
@media (hover: hover) {
2586-
.group-hocus\\:underline:is(:where(.group):hover *) {
2587-
text-decoration-line: underline;
2588-
}
2589-
}
2590-
2591-
@media (hover: hover) {
2592-
.hocus\\:underline:hover {
2540+
.group-hocus\\:underline:is(:where(.group):hover *), .hocus\\:underline:hover {
25932541
text-decoration-line: underline;
25942542
}
25952543
}
@@ -2745,11 +2693,7 @@ describe('@variant', () => {
27452693
),
27462694
).toMatchInlineSnapshot(`
27472695
"@layer utilities {
2748-
.rtl\\:flex:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
2749-
display: flex;
2750-
}
2751-
2752-
.dark\\:flex:is([data-theme="dark"] *) {
2696+
.rtl\\:flex:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *), .dark\\:flex:is([data-theme="dark"] *) {
27532697
display: flex;
27542698
}
27552699

0 commit comments

Comments
 (0)