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

turbopack: add snapshot for named-only @container parsing (#98261)

Co-authored-by: 's avatarTobias Koppers <1365881+sokra@users.noreply.github.com>
parent 6469906e
/*
* https://github.com/vercel/next.js/issues/98261
*
* 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, the issue snapshot should
* disappear.
*/
@supports (container-type: inline-size scroll-state) {
@container scroll-content {
.named-only {
max-width: 100cqw;
}
}
}
@container sidebar (min-width: 400px) {
.named-with-condition {
color: red;
}
}
@container scroll-state(scrollable: top) {
.scroll-state {
color: blue;
}
}
error - [parse] /turbopack/crates/turbopack-tests/tests/snapshot/css/named-container-query/input/style.css:11:28 Parsing CSS source code failed
7 | * is kept in the output. Once lightningcss is fixed, the issue snapshot should
8 | * disappear.
9 | */
10 | @supports (container-type: inline-size scroll-state) {
+ v
11 + @container scroll-content {
+ ^
12 | .named-only {
13 | max-width: 100cqw;
14 | }
15 | }
Unexpected end of input
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
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([
"output/1ece_tests_snapshot_css_named-container-query_input_index_0zo8_3w2m59zd.js",
{"otherChunks":["output/1jsg_tests_snapshot_css_named-container-query_input_style_1i4y8ac_sk8d1.css","output/1jsg_tests_snapshot_css_named-container-query_input_index_075odk3xa0zak.js"],"runtimeModuleIds":["[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/named-container-query/input/index.js [test] (ecmascript)"]}
]);
// Dummy runtime
\ No newline at end of file
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_css_named-container-query_input_index_075odk3xa0zak.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/named-container-query/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([]);
;
}),
]);
//# sourceMappingURL=1jsg_tests_snapshot_css_named-container-query_input_index_075odk3xa0zak.js.map
\ No newline at end of file
{
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}}]
}
\ 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 {
.named-only {
max-width: 100cqw;
}
}
}
@container sidebar (min-width: 400px) {
.named-with-condition {
color: red;
}
}
@container scroll-state(scrollable: top) {
.scroll-state {
color: #00f;
}
}
/*# sourceMappingURL=1jsg_tests_snapshot_css_named-container-query_input_style_1i4y8ac_sk8d1.css.map*/
\ No newline at end of file
{
"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, 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, the issue snapshot should\n * 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":"AASA;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