Skip to content

Commit cdb0997

Browse files
authored
Add inherit as a universal color (#13258)
* add `inherit` as a hardcoded color * add `inherit` to suggestions * update changelog * re-order changelog sections
1 parent 1933d8e commit cdb0997

File tree

5 files changed

+204
-21
lines changed

5 files changed

+204
-21
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
### Changed
10+
### Added
1111

12-
- Inline `@import` rules in `tailwindcss/index.css` at publish time for better performance ([#13233](https://github.com/tailwindlabs/tailwindcss/pull/13233))
12+
- Add `inherit` as a universal color ([#13258](https://github.com/tailwindlabs/tailwindcss/pull/13258))
1313

1414
### Fixed
1515

1616
- Validate bare values ([#13245](https://github.com/tailwindlabs/tailwindcss/pull/13245))
1717

18+
### Changed
19+
20+
- Inline `@import` rules in `tailwindcss/index.css` at publish time for better performance ([#13233](https://github.com/tailwindlabs/tailwindcss/pull/13233))
21+
1822
## [4.0.0-alpha.9] - 2024-03-13
1923

2024
### Added

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

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ exports[`getClassList 1`] = `
256256
"@container-normal",
257257
"absolute",
258258
"accent-current",
259+
"accent-inherit",
259260
"accent-transparent",
260261
"align-baseline",
261262
"align-bottom",
@@ -389,6 +390,7 @@ exports[`getClassList 1`] = `
389390
"bg-gradient-to-tl",
390391
"bg-gradient-to-tr",
391392
"bg-inherit",
393+
"bg-inherit",
392394
"bg-left",
393395
"bg-left-bottom",
394396
"bg-left-top",
@@ -414,6 +416,7 @@ exports[`getClassList 1`] = `
414416
"border",
415417
"border-b",
416418
"border-b-current",
419+
"border-b-inherit",
417420
"border-b-transparent",
418421
"border-collapse",
419422
"border-current",
@@ -422,17 +425,22 @@ exports[`getClassList 1`] = `
422425
"border-double",
423426
"border-e",
424427
"border-e-current",
428+
"border-e-inherit",
425429
"border-e-transparent",
426430
"border-hidden",
431+
"border-inherit",
427432
"border-l",
428433
"border-l-current",
434+
"border-l-inherit",
429435
"border-l-transparent",
430436
"border-none",
431437
"border-r",
432438
"border-r-current",
439+
"border-r-inherit",
433440
"border-r-transparent",
434441
"border-s",
435442
"border-s-current",
443+
"border-s-inherit",
436444
"border-s-transparent",
437445
"border-separate",
438446
"border-solid",
@@ -450,13 +458,16 @@ exports[`getClassList 1`] = `
450458
"border-spacing-y-4",
451459
"border-t",
452460
"border-t-current",
461+
"border-t-inherit",
453462
"border-t-transparent",
454463
"border-transparent",
455464
"border-x",
456465
"border-x-current",
466+
"border-x-inherit",
457467
"border-x-transparent",
458468
"border-y",
459469
"border-y-current",
470+
"border-y-inherit",
460471
"border-y-transparent",
461472
"bottom-0.5",
462473
"bottom-1",
@@ -507,6 +518,7 @@ exports[`getClassList 1`] = `
507518
"caption-bottom",
508519
"caption-top",
509520
"caret-current",
521+
"caret-inherit",
510522
"caret-transparent",
511523
"clear-both",
512524
"clear-end",
@@ -642,6 +654,7 @@ exports[`getClassList 1`] = `
642654
"decoration-dotted",
643655
"decoration-double",
644656
"decoration-from-font",
657+
"decoration-inherit",
645658
"decoration-solid",
646659
"decoration-transparent",
647660
"decoration-wavy",
@@ -658,6 +671,7 @@ exports[`getClassList 1`] = `
658671
"divide-dashed",
659672
"divide-dotted",
660673
"divide-double",
674+
"divide-inherit",
661675
"divide-none",
662676
"divide-solid",
663677
"divide-transparent",
@@ -688,6 +702,7 @@ exports[`getClassList 1`] = `
688702
"end-auto",
689703
"end-full",
690704
"fill-current",
705+
"fill-inherit",
691706
"fill-transparent",
692707
"fixed",
693708
"flex-auto",
@@ -758,6 +773,7 @@ exports[`getClassList 1`] = `
758773
"from-90%",
759774
"from-95%",
760775
"from-current",
776+
"from-inherit",
761777
"from-transparent",
762778
"gap-0.5",
763779
"gap-1",
@@ -858,9 +874,11 @@ exports[`getClassList 1`] = `
858874
"inset-ring-4",
859875
"inset-ring-8",
860876
"inset-ring-current",
877+
"inset-ring-inherit",
861878
"inset-ring-transparent",
862879
"inset-shadow",
863880
"inset-shadow-current",
881+
"inset-shadow-inherit",
864882
"inset-shadow-transparent",
865883
"inset-x-0.5",
866884
"inset-x-1",
@@ -1116,6 +1134,7 @@ exports[`getClassList 1`] = `
11161134
"outline-dashed",
11171135
"outline-dotted",
11181136
"outline-double",
1137+
"outline-inherit",
11191138
"outline-none",
11201139
"outline-offset-0",
11211140
"outline-offset-1",
@@ -1184,6 +1203,7 @@ exports[`getClassList 1`] = `
11841203
"place-self-start",
11851204
"place-self-stretch",
11861205
"placeholder-current",
1206+
"placeholder-inherit",
11871207
"placeholder-transparent",
11881208
"pointer-events-auto",
11891209
"pointer-events-none",
@@ -1226,13 +1246,15 @@ exports[`getClassList 1`] = `
12261246
"ring-4",
12271247
"ring-8",
12281248
"ring-current",
1249+
"ring-inherit",
12291250
"ring-inset",
12301251
"ring-offset-0",
12311252
"ring-offset-1",
12321253
"ring-offset-2",
12331254
"ring-offset-4",
12341255
"ring-offset-8",
12351256
"ring-offset-current",
1257+
"ring-offset-inherit",
12361258
"ring-offset-transparent",
12371259
"ring-transparent",
12381260
"rotate-0",
@@ -1444,6 +1466,7 @@ exports[`getClassList 1`] = `
14441466
"sepia-50",
14451467
"shadow",
14461468
"shadow-current",
1469+
"shadow-inherit",
14471470
"shadow-transparent",
14481471
"shrink",
14491472
"shrink-0",
@@ -1512,6 +1535,7 @@ exports[`getClassList 1`] = `
15121535
"stroke-2",
15131536
"stroke-3",
15141537
"stroke-current",
1538+
"stroke-inherit",
15151539
"stroke-none",
15161540
"stroke-transparent",
15171541
"subpixel-antialiased",
@@ -1533,6 +1557,7 @@ exports[`getClassList 1`] = `
15331557
"text-current",
15341558
"text-ellipsis",
15351559
"text-end",
1560+
"text-inherit",
15361561
"text-justify",
15371562
"text-left",
15381563
"text-nowrap",
@@ -1564,6 +1589,7 @@ exports[`getClassList 1`] = `
15641589
"to-90%",
15651590
"to-95%",
15661591
"to-current",
1592+
"to-inherit",
15671593
"to-transparent",
15681594
"top-0.5",
15691595
"top-1",
@@ -1638,6 +1664,7 @@ exports[`getClassList 1`] = `
16381664
"via-90%",
16391665
"via-95%",
16401666
"via-current",
1667+
"via-inherit",
16411668
"via-none",
16421669
"via-transparent",
16431670
"visible",

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

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ exports[`border-* 1`] = `
9090
border-color: color-mix(in srgb, currentColor 50%, transparent);
9191
}
9292
93+
.border-inherit {
94+
border-color: inherit;
95+
}
96+
9397
.border-red-500 {
9498
border-color: #ef4444;
9599
}
@@ -199,6 +203,10 @@ exports[`border-b-* 1`] = `
199203
border-bottom-color: color-mix(in srgb, currentColor 50%, transparent);
200204
}
201205
206+
.border-b-inherit {
207+
border-bottom-color: inherit;
208+
}
209+
202210
.border-b-red-500 {
203211
border-bottom-color: #ef4444;
204212
}
@@ -308,6 +316,10 @@ exports[`border-e-* 1`] = `
308316
border-inline-end-color: color-mix(in srgb, currentColor 50%, transparent);
309317
}
310318
319+
.border-e-inherit {
320+
border-inline-end-color: inherit;
321+
}
322+
311323
.border-e-red-500 {
312324
border-inline-end-color: #ef4444;
313325
}
@@ -417,6 +429,10 @@ exports[`border-l-* 1`] = `
417429
border-left-color: color-mix(in srgb, currentColor 50%, transparent);
418430
}
419431
432+
.border-l-inherit {
433+
border-left-color: inherit;
434+
}
435+
420436
.border-l-red-500 {
421437
border-left-color: #ef4444;
422438
}
@@ -526,6 +542,10 @@ exports[`border-r-* 1`] = `
526542
border-right-color: color-mix(in srgb, currentColor 50%, transparent);
527543
}
528544
545+
.border-r-inherit {
546+
border-right-color: inherit;
547+
}
548+
529549
.border-r-red-500 {
530550
border-right-color: #ef4444;
531551
}
@@ -635,6 +655,10 @@ exports[`border-s-* 1`] = `
635655
border-inline-start-color: color-mix(in srgb, currentColor 50%, transparent);
636656
}
637657
658+
.border-s-inherit {
659+
border-inline-start-color: inherit;
660+
}
661+
638662
.border-s-red-500 {
639663
border-inline-start-color: #ef4444;
640664
}
@@ -744,6 +768,10 @@ exports[`border-t-* 1`] = `
744768
border-top-color: color-mix(in srgb, currentColor 50%, transparent);
745769
}
746770
771+
.border-t-inherit {
772+
border-top-color: inherit;
773+
}
774+
747775
.border-t-red-500 {
748776
border-top-color: #ef4444;
749777
}
@@ -881,6 +909,11 @@ exports[`border-x-* 1`] = `
881909
border-right-color: color-mix(in srgb, currentColor 50%, transparent);
882910
}
883911
912+
.border-x-inherit {
913+
border-left-color: inherit;
914+
border-right-color: inherit;
915+
}
916+
884917
.border-x-red-500 {
885918
border-left-color: #ef4444;
886919
border-right-color: #ef4444;
@@ -1021,6 +1054,11 @@ exports[`border-y-* 1`] = `
10211054
border-bottom-color: color-mix(in srgb, currentColor 50%, transparent);
10221055
}
10231056
1057+
.border-y-inherit {
1058+
border-top-color: inherit;
1059+
border-bottom-color: inherit;
1060+
}
1061+
10241062
.border-y-red-500 {
10251063
border-top-color: #ef4444;
10261064
border-bottom-color: #ef4444;

0 commit comments

Comments
 (0)