Skip to content

css: bound raw-token expansion when compiling nesting for older targets - #32453

Open
robobun wants to merge 8 commits into
mainfrom
farm/d32cfd68/css-token-expansion-cap
Open

css: bound raw-token expansion when compiling nesting for older targets#32453
robobun wants to merge 8 commits into
mainfrom
farm/d32cfd68/css-token-expansion-cap

[autofix.ci] apply automated fixes

906877e
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jun 17, 2026 in 44m 12s

Code review found 1 potential issue

Found 1 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/css/declaration.rs:94-105 token_weight() _ => 0 arm: typed comma-list properties are not fixed-size; doc-comment claim is inaccurate and cap is by

Annotations

Check warning on line 105 in src/css/declaration.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

token_weight() _ => 0 arm: typed comma-list properties are not fixed-size; doc-comment claim is inaccurate and cap is bypassable

The doc comment's claim that "Other property kinds are fixed-size values whose clone cost is already bounded by the selector-expansion cap" is inaccurate — ~30 `Property` variants (`FontFamily(Vec<FontFamily>)`, `BackgroundImage`, `MaskImage`, `TransitionProperty`, `BoxShadow`, …) carry unbounded comma-lists that parse as typed (not Unparsed/Custom), hit the `_ => 0` arm, and are fully reallocated by `Property::deep_clone` on every partition clone. Under 14 `::part()` levels with a ~5000-entry l