Skip to content

Commit d3b2ce8

Browse files
fix(css): pair scoped grid areas with their implicit -start / -end lines and inline grid @values (#23199)
* fix(css): keep implicit grid -start / -end line names paired with their area Scope a grid name by the part before its trailing -start / -end run, so area `main` and lines `main-start` / `main-end` share one scoped ident. Fixes #23197 Claude-Session: https://claude.ai/code/session_013FhutRXvVkNXKVCXPyrg1z * fix(css): pair imported grid names with their implicit -start / -end lines Resolve an imported grid name to the area or line its module declares, spelled as that module does, and drop the false "not found" warning when only the implicit pair is declared. Claude-Session: https://claude.ai/code/session_013FhutRXvVkNXKVCXPyrg1z * fix(css): resolve an imported grid name through its exact @value only A local line of an imported area reuses that import, and the scoped name takes the defining module's spelling plus the local -start / -end. Names the defining module never writes move to a follow-up. Claude-Session: https://claude.ai/code/session_013FhutRXvVkNXKVCXPyrg1z * fix(css): keep a grid line local when its imported prefix is no grid name `grid-row: primary-start` beside `@value primary from` a plain value became `red-primary`; it is a name of its own and scopes in its module. Claude-Session: https://claude.ai/code/session_013FhutRXvVkNXKVCXPyrg1z * fix(css): resolve a @value import of an implicit grid area or line `@value area-start` from a module declaring only area `area`, or `@value line` from one declaring only `line-start` / `line-end`, now resolves to that area or line instead of staying unscoped with a false "not found" warning. Claude-Session: https://claude.ai/code/session_013FhutRXvVkNXKVCXPyrg1z * fix(css): inline a @value in a grid position as if written there A local or imported plain @value now scopes in the module using it when it is a name, and stays text when it is a keyword of the property or not a name: `auto`, `span 2` and an imported `hero` no longer turn into `style_auto-auto`, `span 2-impSpan` or `hero-impHero`. Claude-Session: https://claude.ai/code/session_013FhutRXvVkNXKVCXPyrg1z * refactor(css): drop the per-call resolution cache and skip discarded entries The export index joins the import index on the per-build module record, the target module comes straight from the module graph, and apply skips composes in the CSS pass and demoted names in the JS pass, whose results it threw away. Claude-Session: https://claude.ai/code/session_013FhutRXvVkNXKVCXPyrg1z * refactor(css): fold duplicated CSS modules branches One warning build for both export collisions, one loop for global and local composes names, and the JS export pass walks the already distinct convention names without a per-entry Set, unescaping only when a name is used. Export entries start with their memo fields so they share a shape. Claude-Session: https://claude.ai/code/session_013FhutRXvVkNXKVCXPyrg1z * chore: cover the grid @value fix in the changeset Claude-Session: https://claude.ai/code/session_013FhutRXvVkNXKVCXPyrg1z * fix(css): route a grid line through its longest imported prefix `region-start-end` beside `@value area as region-start` is that import's `-end` line, so the lookup now tries each shorter prefix before the bare area name. Claude-Session: https://claude.ai/code/session_013FhutRXvVkNXKVCXPyrg1z * refactor(css): share one warning build in @value and export checks `getWarnings` builds both warnings in one place and looks up the parent module once, `getReferencedExports` returns as soon as an entry references the whole exports object, and `@value` handles a broken at-rule once and records both local spellings through one call. Claude-Session: https://claude.ai/code/session_013FhutRXvVkNXKVCXPyrg1z * refactor(css): record a declaration from the export entry just pushed `recordDeclaration` takes only the kind and reads the name and position from the entry `addCssExport` pushed, so each of its 12 calls drops three arguments and a declaration no longer copies the entry's location. Claude-Session: https://claude.ai/code/session_013FhutRXvVkNXKVCXPyrg1z * refactor(css): walk a resolved @value chain once per entry `apply` followed a `RESOLVED_*` entry's import chain up to three times: for the keyword test, the declaration and the value. It now walks it once, tests the plain text for a keyword, and only then localizes the target, which `localizeTarget` does as a separate step for every caller. Claude-Session: https://claude.ai/code/session_013FhutRXvVkNXKVCXPyrg1z * fix(css): carry a grid line's suffix instead of slicing the local name A local alias of an import (`@value yy: area`) shares the import's definition, so slicing `yy-start` by the import's local name produced `lib_areatart`, and `@value aa: impAuto` scoped instead of inlining `auto`. The parser now records the suffix it stripped. Claude-Session: https://claude.ai/code/session_013FhutRXvVkNXKVCXPyrg1z
1 parent ab24e5c commit d3b2ce8

25 files changed

Lines changed: 1030 additions & 601 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"webpack": patch
3+
---
4+
5+
Pair grid areas with their implicit `-start` / `-end` lines and inline grid `@value`s.

0 commit comments

Comments
 (0)