Skip to content

Commit

Permalink
Update lightningcss (#74695)
Browse files Browse the repository at this point in the history
This has the View Transitions fix for CSS modules.
  • Loading branch information
sebmarkbage authored Jan 9, 2025
1 parent 8c1e3d9 commit 7a1f032
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 50 deletions.
19 changes: 10 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ indoc = "2.0.0"
itertools = "0.10.5"
lazy_static = "1.4.0"
log = "0.4.17"
lightningcss = { version = "1.0.0-alpha.61", features = [
lightningcss = { version = "1.0.0-alpha.63", features = [
"serde",
"visitor",
"into_owned",
] }
lightningcss-napi = { version = "0.4.0", default-features = false, features = [
lightningcss-napi = { version = "0.4.3", default-features = false, features = [
"visitor"
]}
markdown = "1.0.0-alpha.18"
Expand All @@ -165,7 +165,7 @@ nohash-hasher = "0.2.0"
notify = "6.1.1"
once_cell = "1.17.1"
owo-colors = "3.5.0"
parcel_selectors = "0.28.0"
parcel_selectors = "0.28.1"
parking_lot = "0.12.1"
pathdiff = "0.2.1"
petgraph = "0.6.3"
Expand Down
76 changes: 38 additions & 38 deletions test/integration/css/test/css-compilation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ module.exports = {
)
} else if (useLightningcss) {
expect(cssContentWithoutSourceMap).toMatchInlineSnapshot(
`"@media (min-width:480px) and (max-width:767.999px){::placeholder{color:green}}.flex-parsing{flex:0 0 calc(50% - var(--vertical-gutter))}.transform-parsing{transform:translate3d(0,0)}.css-grid-shorthand{grid-column:span 2}.g-docs-sidenav .filter::-webkit-input-placeholder{opacity:.8}"`
`"@media (min-width:480px) and (not (min-width:768px)){::placeholder{color:green}}.flex-parsing{flex:0 0 calc(50% - var(--vertical-gutter))}.transform-parsing{transform:translate3d(0,0)}.css-grid-shorthand{grid-column:span 2}.g-docs-sidenav .filter::-webkit-input-placeholder{opacity:.8}"`
)
} else {
expect(cssContentWithoutSourceMap).toMatchInlineSnapshot(
Expand Down Expand Up @@ -234,37 +234,37 @@ module.exports = {
`)
} else if (useLightningcss) {
expect(sourceMapContentParsed).toMatchInlineSnapshot(`
{
"mappings": "AAAA,mDACE,cACE,WACF,CACF,CAEA,cACE,2CACF,CAEA,mBACE,0BACF,CAEA,oBACE,kBACF,CAEA,mDACE,UACF",
"names": [],
"sourceRoot": "",
"sourcesContent": [
"@media (min-width: 480px) and (max-width: 767.999px) {
::placeholder {
color: green;
}
}
.flex-parsing {
flex: 0 0 calc(50% - var(--vertical-gutter));
}
.transform-parsing {
transform: translate3d(0px, 0px);
}
.css-grid-shorthand {
grid-column: span 2;
}
.g-docs-sidenav .filter::-webkit-input-placeholder {
opacity: .8;
}
",
],
"version": 3,
}
{
"mappings": "AAAA,qDACE,cACE,WACF,CACF,CAEA,cACE,2CACF,CAEA,mBACE,0BACF,CAEA,oBACE,kBACF,CAEA,mDACE,UACF",
"names": [],
"sourceRoot": "",
"sourcesContent": [
"@media (min-width: 480px) and (not (min-width: 768px)) {
::placeholder {
color: green;
}
}
.flex-parsing {
flex: 0 0 calc(50% - var(--vertical-gutter));
}
.transform-parsing {
transform: translate3d(0px, 0px);
}
.css-grid-shorthand {
grid-column: span 2;
}
.g-docs-sidenav .filter::-webkit-input-placeholder {
opacity: .8;
}
",
],
"version": 3,
}
`)
} else {
expect(sourceMapContentParsed).toMatchInlineSnapshot(`
Expand Down Expand Up @@ -549,19 +549,19 @@ module.exports = {
if (process.env.TURBOPACK && useLightningcss) {
expect(cssContent.replace(/\/\*.*?\*\//g, '').trim())
.toMatchInlineSnapshot(`
".other{color:#00f}
".other{color:#00f}
.test{color:red}"
`)
.test{color:red}"
`)
} else if (process.env.TURBOPACK && !useLightningcss) {
expect(cssContent.replace(/\/\*.*?\*\//g, '').trim())
.toMatchInlineSnapshot(`
".other{color:#00f}
".other{color:#00f}
.test{color:red}"
`)
.test{color:red}"
`)
} else if (useLightningcss) {
expect(
cssContent.replace(/\/\*.*?\*\//g, '').trim()
Expand Down

0 comments on commit 7a1f032

Please sign in to comment.