Finding
The fluid type and space scales (--sf-text-*, --sf-space-* in core/tokens.css:964-972, 1102-1110) compute via clamp() driven by 100vw — they respond to the browser viewport width. Meanwhile the framework's layout primitives (.sf-grid-cols-*, .sf-content-grid, .sf-bento in core/layout.css) respond to @container — they respond to their own parent's width.
Why this matters
Nest a section inside a narrow context (a sidebar, a 1/3 column, a card once .sf-card ships) and the two systems disagree: the layout primitive correctly adapts to the narrow container, but the text and spacing inside it still scale as if the element spans the full viewport, because vw-based clamps have no awareness of an ancestor container's actual width. This is an internal inconsistency between two core pillars of the same framework, not a cosmetic gap.
Scope
- Investigate a container-relative variant of the fluid scale (
cqi-based clamps) for components that opt in — likely not a wholesale replacement of the viewport-based default (that's the right choice for page-level type), but an additional token set or opt-in mechanism for nested/narrow contexts.
- Needs design work on where the opt-in boundary lives (per-component class? a
--sf-fluid-context: container switch?) before implementation.
- Update
docs/llm-guide.md if a new token role/mechanism ships, per repo CLAUDE.md.
Finding
The fluid type and space scales (
--sf-text-*,--sf-space-*incore/tokens.css:964-972, 1102-1110) compute viaclamp()driven by100vw— they respond to the browser viewport width. Meanwhile the framework's layout primitives (.sf-grid-cols-*,.sf-content-grid,.sf-bentoincore/layout.css) respond to@container— they respond to their own parent's width.Why this matters
Nest a section inside a narrow context (a sidebar, a 1/3 column, a card once
.sf-cardships) and the two systems disagree: the layout primitive correctly adapts to the narrow container, but the text and spacing inside it still scale as if the element spans the full viewport, becausevw-based clamps have no awareness of an ancestor container's actual width. This is an internal inconsistency between two core pillars of the same framework, not a cosmetic gap.Scope
cqi-based clamps) for components that opt in — likely not a wholesale replacement of the viewport-based default (that's the right choice for page-level type), but an additional token set or opt-in mechanism for nested/narrow contexts.--sf-fluid-context: containerswitch?) before implementation.docs/llm-guide.mdif a new token role/mechanism ships, per repoCLAUDE.md.