Skip to content

Commit a11c80d

Browse files
Upgrade lightningcss to 1.29.0 (#15576)
Closes #15438 Closes #15560 Closes #15561 Closes #15562 This PR upgrades `lightningcss` to `1.29.0` and uses the [new feature flag](parcel-bundler/lightningcss@3043896) to disable the light-dark function transpilation.
1 parent d7c8448 commit a11c80d

File tree

12 files changed

+150
-97
lines changed

12 files changed

+150
-97
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"packageManager": "[email protected]",
6464
"pnpm": {
6565
"patchedDependencies": {
66-
"lightningcss@1.26.0": "patches/lightningcss@1.26.0.patch",
66+
"lightningcss@1.29.0": "patches/lightningcss@1.29.0.patch",
6767
"@parcel/[email protected]": "patches/@[email protected]"
6868
}
6969
}

packages/@tailwindcss-cli/src/commands/build/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ function optimizeCss(
445445
deepSelectorCombinator: true,
446446
},
447447
include: Features.Nesting,
448-
exclude: Features.LogicalProperties | Features.DirSelector,
448+
exclude: Features.LogicalProperties | Features.DirSelector | Features.LightDark,
449449
targets: {
450450
safari: (16 << 16) | (4 << 8),
451451
ios_saf: (16 << 16) | (4 << 8),

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,9 +400,9 @@ exports[`\`@import 'tailwindcss'\` is replaced with the generated CSS 1`] = `
400400
}
401401
402402
hr {
403+
height: 0;
403404
color: inherit;
404405
border-top-width: 1px;
405-
height: 0;
406406
}
407407
408408
abbr:where([title]) {
@@ -472,7 +472,7 @@ exports[`\`@import 'tailwindcss'\` is replaced with the generated CSS 1`] = `
472472
}
473473
474474
ol, ul, menu {
475-
list-style: none;
475+
list-style-type: none;
476476
}
477477
478478
img, svg, video, canvas, audio, iframe, embed, object {
@@ -533,8 +533,8 @@ exports[`\`@import 'tailwindcss'\` is replaced with the generated CSS 1`] = `
533533
}
534534
535535
::-webkit-date-and-time-value {
536-
text-align: inherit;
537536
min-height: 1lh;
537+
text-align: inherit;
538538
}
539539
540540
::-webkit-datetime-edit {

packages/@tailwindcss-postcss/src/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,10 @@ function optimizeCss(
317317
deepSelectorCombinator: true,
318318
},
319319
include: LightningCssFeatures.Nesting,
320-
exclude: LightningCssFeatures.LogicalProperties | LightningCssFeatures.DirSelector,
320+
exclude:
321+
LightningCssFeatures.LogicalProperties |
322+
LightningCssFeatures.DirSelector |
323+
LightningCssFeatures.LightDark,
321324
targets: {
322325
safari: (16 << 16) | (4 << 8),
323326
ios_saf: (16 << 16) | (4 << 8),

packages/@tailwindcss-vite/src/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,10 @@ function optimizeCss(
375375
deepSelectorCombinator: true,
376376
},
377377
include: LightningCssFeatures.Nesting,
378-
exclude: LightningCssFeatures.LogicalProperties | LightningCssFeatures.DirSelector,
378+
exclude:
379+
LightningCssFeatures.LogicalProperties |
380+
LightningCssFeatures.DirSelector |
381+
LightningCssFeatures.LightDark,
379382
targets: {
380383
safari: (16 << 16) | (4 << 8),
381384
ios_saf: (16 << 16) | (4 << 8),

packages/tailwindcss/preflight.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ summary {
205205
ol,
206206
ul,
207207
menu {
208-
list-style: none;
208+
list-style-type: none;
209209
}
210210

211211
/*

packages/tailwindcss/src/test-utils/run.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function optimizeCss(
2828
deepSelectorCombinator: true,
2929
},
3030
include: Features.Nesting,
31-
exclude: Features.LogicalProperties | Features.DirSelector,
31+
exclude: Features.LogicalProperties | Features.DirSelector | Features.LightDark,
3232
targets: {
3333
safari: (16 << 16) | (4 << 8),
3434
ios_saf: (16 << 16) | (4 << 8),

packages/tailwindcss/src/utilities.test.ts

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6839,53 +6839,26 @@ test('color-scheme', async () => {
68396839
]),
68406840
).toMatchInlineSnapshot(`
68416841
".scheme-dark {
6842-
--lightningcss-light: ;
6843-
--lightningcss-dark: initial;
6844-
--lightningcss-light: ;
6845-
--lightningcss-dark: initial;
68466842
color-scheme: dark;
68476843
}
68486844
68496845
.scheme-light {
6850-
--lightningcss-light: initial;
6851-
--lightningcss-dark: ;
6852-
--lightningcss-light: initial;
6853-
--lightningcss-dark: ;
68546846
color-scheme: light;
68556847
}
68566848
68576849
.scheme-light-dark {
6858-
--lightningcss-light: initial;
6859-
--lightningcss-dark: ;
6860-
--lightningcss-light: initial;
6861-
--lightningcss-dark: ;
68626850
color-scheme: light dark;
68636851
}
68646852
6865-
@media (prefers-color-scheme: dark) {
6866-
.scheme-light-dark {
6867-
--lightningcss-light: ;
6868-
--lightningcss-dark: initial;
6869-
}
6870-
}
6871-
68726853
.scheme-normal {
68736854
color-scheme: normal;
68746855
}
68756856
68766857
.scheme-only-dark {
6877-
--lightningcss-light: ;
6878-
--lightningcss-dark: initial;
6879-
--lightningcss-light: ;
6880-
--lightningcss-dark: initial;
68816858
color-scheme: dark only;
68826859
}
68836860
68846861
.scheme-only-light {
6885-
--lightningcss-light: initial;
6886-
--lightningcss-dark: ;
6887-
--lightningcss-light: initial;
6888-
--lightningcss-dark: ;
68896862
color-scheme: light only;
68906863
}"
68916864
`)
@@ -14376,7 +14349,7 @@ test('transition', async () => {
1437614349
}
1437714350
1437814351
.transition {
14379-
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, -webkit-backdrop-filter, -webkit-backdrop-filter, backdrop-filter;
14352+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter;
1438014353
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
1438114354
transition-duration: var(--tw-duration, var(--default-transition-duration));
1438214355
}
@@ -14443,7 +14416,7 @@ test('transition', async () => {
1444314416
}
1444414417
1444514418
.transition {
14446-
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, -webkit-backdrop-filter, -webkit-backdrop-filter, backdrop-filter;
14419+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter;
1444714420
transition-timing-function: var(--tw-ease, ease);
1444814421
transition-duration: var(--tw-duration, .1s);
1444914422
}

packages/tailwindcss/src/variants.test.ts

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ test('first-line', async () => {
5353

5454
test('marker', async () => {
5555
expect(await run(['marker:flex'])).toMatchInlineSnapshot(`
56-
".marker\\:flex ::marker, .marker\\:flex::marker {
56+
".marker\\:flex ::marker {
57+
display: flex;
58+
}
59+
60+
.marker\\:flex::marker {
5761
display: flex;
5862
}"
5963
`)
@@ -1533,25 +1537,25 @@ test('not', async () => {
15331537
}
15341538
}
15351539
1536-
@media not (width < 640px) {
1540+
@media (width >= 640px) {
15371541
.not-max-sm\\:flex {
15381542
display: flex;
15391543
}
15401544
}
15411545
1542-
@media not (width < 130px) {
1546+
@media (width >= 130px) {
15431547
.not-max-\\[130px\\]\\:flex {
15441548
display: flex;
15451549
}
15461550
}
15471551
1548-
@media not (width >= 130px) {
1552+
@media (width < 130px) {
15491553
.not-min-\\[130px\\]\\:flex {
15501554
display: flex;
15511555
}
15521556
}
15531557
1554-
@media not (width >= 640px) {
1558+
@media (width < 640px) {
15551559
.not-min-sm\\:flex, .not-sm\\:flex {
15561560
display: flex;
15571561
}
@@ -2165,7 +2169,15 @@ test('variant order', async () => {
21652169
}
21662170
}
21672171
2168-
.first-letter\\:flex:first-letter, .first-line\\:flex:first-line, .marker\\:flex ::marker, .marker\\:flex::marker {
2172+
.first-letter\\:flex:first-letter, .first-line\\:flex:first-line {
2173+
display: flex;
2174+
}
2175+
2176+
.marker\\:flex ::marker {
2177+
display: flex;
2178+
}
2179+
2180+
.marker\\:flex::marker {
21692181
display: flex;
21702182
}
21712183
File renamed without changes.

0 commit comments

Comments
 (0)