Unverified Commit 13ae2ded authored by vercel-fleet-prod[bot]'s avatar vercel-fleet-prod[bot] Committed by GitHub

Revert lightningcss workaround; keep snapshot documenting #98261

The bug is reported upstream in parcel-bundler/lightningcss#1370.
Co-authored-by: 's avatarTobias Koppers <1365881+sokra@users.noreply.github.com>
parent 69dd6a49
......@@ -9664,7 +9664,6 @@ dependencies = [
"anyhow",
"async-trait",
"bincode",
"cssparser",
"indoc",
"lightningcss",
"parcel_selectors",
......
......@@ -16,8 +16,6 @@ workspace = true
anyhow = { workspace = true }
async-trait = { workspace = true }
bincode = { workspace = true }
# Must match the version used by `lightningcss`, so its parsers accept our `cssparser::Parser`.
cssparser = "0.37.0"
indoc = { workspace = true }
lightningcss = { workspace = true }
parcel_selectors = { workspace = true }
......
/*
* https://github.com/vercel/next.js/issues/98261
*
* A name-only `@container <name>` rule is valid CSS. With `error_recovery`
* enabled, lightningcss (1.0.0-alpha.72) reports a false-positive
* `EndOfInput` warning for it and keeps an empty condition. turbopack-css
* drops that warning and normalizes the condition, so this file must produce
* no issue for it and print it as `@container scroll-content {`.
* A name-only `@container <name>` rule is valid CSS, but with `error_recovery`
* enabled lightningcss (1.0.0-alpha.72) still warns `EndOfInput` for the empty
* container condition, which is reported as a parse error issue. The rule itself
* is kept in the output. Once lightningcss is fixed
* (https://github.com/parcel-bundler/lightningcss/issues/1370), the issue
* snapshot should disappear.
*/
@supports (container-type: inline-size scroll-state) {
@container scroll-content {
......@@ -26,16 +27,3 @@
color: blue;
}
}
/* Invalid container names must still be reported. */
@container none {
.reserved-name {
color: green;
}
}
@container inherit {
.css-wide-keyword {
color: green;
}
}
error - [parse] /turbopack/crates/turbopack-tests/tests/snapshot/css/named-container-query/input/style.css:37:10 Parsing CSS source code failed
33 | color: green;
34 | }
35 | }
36 |
+ v
37 + @container inherit {
+ ^
38 | .css-wide-keyword {
39 | color: green;
40 | }
41 | }
error - [parse] /turbopack/crates/turbopack-tests/tests/snapshot/css/named-container-query/input/style.css:12:28 Parsing CSS source code failed
8 | * (https://github.com/parcel-bundler/lightningcss/issues/1370), the issue
9 | * snapshot should disappear.
10 | */
11 | @supports (container-type: inline-size scroll-state) {
+ v
12 + @container scroll-content {
+ ^
13 | .named-only {
14 | max-width: 100cqw;
15 | }
16 | }
Unexpected token Ident("inherit")
Unexpected end of input
Import trace:
test:
......
error - [parse] /turbopack/crates/turbopack-tests/tests/snapshot/css/named-container-query/input/style.css:31:10 Parsing CSS source code failed
27 | }
28 | }
29 |
30 | /* Invalid container names must still be reported. */
+ v
31 + @container none {
+ ^
32 | .reserved-name {
33 | color: green;
34 | }
35 | }
Unexpected token Ident("none")
Import trace:
test:
./turbopack/crates/turbopack-tests/tests/snapshot/css/named-container-query/input/style.css
./turbopack/crates/turbopack-tests/tests/snapshot/css/named-container-query/input/index.js
\ No newline at end of file
/* [project]/turbopack/crates/turbopack-tests/tests/snapshot/css/named-container-query/input/style.css [test] (css) */
@supports (container-type: inline-size scroll-state) {
@container scroll-content {
@container scroll-content {
.named-only {
max-width: 100cqw;
}
......@@ -19,16 +19,4 @@
}
}
@container none {
.reserved-name {
color: green;
}
}
@container inherit {
.css-wide-keyword {
color: green;
}
}
/*# sourceMappingURL=1jsg_tests_snapshot_css_named-container-query_input_style_1i4y8ac_sk8d1.css.map*/
\ No newline at end of file
......@@ -2,5 +2,5 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 1, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/named-container-query/input/style.css"],"sourcesContent":["/*\n * https://github.com/vercel/next.js/issues/98261\n *\n * A name-only `@container <name>` rule is valid CSS. With `error_recovery`\n * enabled, lightningcss (1.0.0-alpha.72) reports a false-positive\n * `EndOfInput` warning for it and keeps an empty condition. turbopack-css\n * drops that warning and normalizes the condition, so this file must produce\n * no issue for it and print it as `@container scroll-content {`.\n */\n@supports (container-type: inline-size scroll-state) {\n @container scroll-content {\n .named-only {\n max-width: 100cqw;\n }\n }\n}\n\n@container sidebar (min-width: 400px) {\n .named-with-condition {\n color: red;\n }\n}\n\n@container scroll-state(scrollable: top) {\n .scroll-state {\n color: blue;\n }\n}\n\n/* Invalid container names must still be reported. */\n@container none {\n .reserved-name {\n color: green;\n }\n}\n\n@container inherit {\n .css-wide-keyword {\n color: green;\n }\n}\n"],"names":[],"mappings":"AASA;EACE;IACE;;;;;;AAMJ;EACE;;;;;AAKF;EACE;;;;;AAMF;EACE;;;;;AAKF;EACE"}}]
{"offset": {"line": 1, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/named-container-query/input/style.css"],"sourcesContent":["/*\n * https://github.com/vercel/next.js/issues/98261\n *\n * A name-only `@container <name>` rule is valid CSS, but with `error_recovery`\n * enabled lightningcss (1.0.0-alpha.72) still warns `EndOfInput` for the empty\n * container condition, which is reported as a parse error issue. The rule itself\n * is kept in the output. Once lightningcss is fixed\n * (https://github.com/parcel-bundler/lightningcss/issues/1370), the issue\n * snapshot should disappear.\n */\n@supports (container-type: inline-size scroll-state) {\n @container scroll-content {\n .named-only {\n max-width: 100cqw;\n }\n }\n}\n\n@container sidebar (min-width: 400px) {\n .named-with-condition {\n color: red;\n }\n}\n\n@container scroll-state(scrollable: top) {\n .scroll-state {\n color: blue;\n }\n}\n"],"names":[],"mappings":"AAUA;EACE;IACE;;;;;;AAMJ;EACE;;;;;AAKF;EACE"}}]
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment