Skip to content

Commit 3bea760

Browse files
authored
Add test coverage for property-specific colors (#17436)
There are several property-specific color variables available to maintain compatibility with v3. [My team and I would like to use them](#17400), but would feel more comfortable if they were formally supported by v4. This PR adds test coverage for those features. @RobinMalfait has confirmed that these features are not intended to be removed, [see conversation here →](https://discord.com/channels/486935104384532500/546706299010678784/1355213322995110171) @crswll Has opened a PR here for the related documentation - tailwindlabs/tailwindcss.com#2178
1 parent 6d8dd82 commit 3bea760

File tree

2 files changed

+132
-0
lines changed

2 files changed

+132
-0
lines changed

packages/tailwindcss/src/__snapshots__/utilities.test.ts.snap

+45
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ exports[`border-* 1`] = `
1111
1212
:root, :host {
1313
--color-red-500: #ef4444;
14+
--border-color-blue-500: #3b82f6;
1415
}
1516
1617
.border {
@@ -111,6 +112,10 @@ exports[`border-* 1`] = `
111112
}
112113
}
113114
115+
.border-blue-500 {
116+
border-color: var(--border-color-blue-500);
117+
}
118+
114119
.border-current, .border-current\\/50 {
115120
border-color: currentColor;
116121
}
@@ -191,6 +196,7 @@ exports[`border-b-* 1`] = `
191196
192197
:root, :host {
193198
--color-red-500: #ef4444;
199+
--border-color-blue-500: #3b82f6;
194200
}
195201
196202
.border-b {
@@ -291,6 +297,10 @@ exports[`border-b-* 1`] = `
291297
}
292298
}
293299
300+
.border-b-blue-500 {
301+
border-bottom-color: var(--border-color-blue-500);
302+
}
303+
294304
.border-b-current, .border-b-current\\/50 {
295305
border-bottom-color: currentColor;
296306
}
@@ -371,6 +381,7 @@ exports[`border-e-* 1`] = `
371381
372382
:root, :host {
373383
--color-red-500: #ef4444;
384+
--border-color-blue-500: #3b82f6;
374385
}
375386
376387
.border-e {
@@ -471,6 +482,10 @@ exports[`border-e-* 1`] = `
471482
}
472483
}
473484
485+
.border-e-blue-500 {
486+
border-inline-end-color: var(--border-color-blue-500);
487+
}
488+
474489
.border-e-current, .border-e-current\\/50 {
475490
border-inline-end-color: currentColor;
476491
}
@@ -551,6 +566,7 @@ exports[`border-l-* 1`] = `
551566
552567
:root, :host {
553568
--color-red-500: #ef4444;
569+
--border-color-blue-500: #3b82f6;
554570
}
555571
556572
.border-l {
@@ -651,6 +667,10 @@ exports[`border-l-* 1`] = `
651667
}
652668
}
653669
670+
.border-l-blue-500 {
671+
border-left-color: var(--border-color-blue-500);
672+
}
673+
654674
.border-l-current, .border-l-current\\/50 {
655675
border-left-color: currentColor;
656676
}
@@ -731,6 +751,7 @@ exports[`border-r-* 1`] = `
731751
732752
:root, :host {
733753
--color-red-500: #ef4444;
754+
--border-color-blue-500: #3b82f6;
734755
}
735756
736757
.border-r {
@@ -831,6 +852,10 @@ exports[`border-r-* 1`] = `
831852
}
832853
}
833854
855+
.border-r-blue-500 {
856+
border-right-color: var(--border-color-blue-500);
857+
}
858+
834859
.border-r-current, .border-r-current\\/50 {
835860
border-right-color: currentColor;
836861
}
@@ -911,6 +936,7 @@ exports[`border-s-* 1`] = `
911936
912937
:root, :host {
913938
--color-red-500: #ef4444;
939+
--border-color-blue-500: #3b82f6;
914940
}
915941
916942
.border-s {
@@ -1011,6 +1037,10 @@ exports[`border-s-* 1`] = `
10111037
}
10121038
}
10131039
1040+
.border-s-blue-500 {
1041+
border-inline-start-color: var(--border-color-blue-500);
1042+
}
1043+
10141044
.border-s-current, .border-s-current\\/50 {
10151045
border-inline-start-color: currentColor;
10161046
}
@@ -1091,6 +1121,7 @@ exports[`border-t-* 1`] = `
10911121
10921122
:root, :host {
10931123
--color-red-500: #ef4444;
1124+
--border-color-blue-500: #3b82f6;
10941125
}
10951126
10961127
.border-t {
@@ -1191,6 +1222,10 @@ exports[`border-t-* 1`] = `
11911222
}
11921223
}
11931224
1225+
.border-t-blue-500 {
1226+
border-top-color: var(--border-color-blue-500);
1227+
}
1228+
11941229
.border-t-current, .border-t-current\\/50 {
11951230
border-top-color: currentColor;
11961231
}
@@ -1271,6 +1306,7 @@ exports[`border-x-* 1`] = `
12711306
12721307
:root, :host {
12731308
--color-red-500: #ef4444;
1309+
--border-color-blue-500: #3b82f6;
12741310
}
12751311
12761312
.border-x {
@@ -1371,6 +1407,10 @@ exports[`border-x-* 1`] = `
13711407
}
13721408
}
13731409
1410+
.border-x-blue-500 {
1411+
border-inline-color: var(--border-color-blue-500);
1412+
}
1413+
13741414
.border-x-current, .border-x-current\\/50 {
13751415
border-inline-color: currentColor;
13761416
}
@@ -1451,6 +1491,7 @@ exports[`border-y-* 1`] = `
14511491
14521492
:root, :host {
14531493
--color-red-500: #ef4444;
1494+
--border-color-blue-500: #3b82f6;
14541495
}
14551496
14561497
.border-y {
@@ -1551,6 +1592,10 @@ exports[`border-y-* 1`] = `
15511592
}
15521593
}
15531594
1595+
.border-y-blue-500 {
1596+
border-block-color: var(--border-color-blue-500);
1597+
}
1598+
15541599
.border-y-current, .border-y-current\\/50 {
15551600
border-block-color: currentColor;
15561601
}

0 commit comments

Comments
 (0)