Skip to content

/plans: the limit bars grow in view, as they were meant to - #227

Merged
xuelink merged 1 commit into
mainfrom
claude/plans-bars-reveal
Sep 24, 2026
Merged

xuelink merged 1 commit into
mainfrom
claude/plans-bars-reveal

Conversation

@xuelink

@xuelink xuelink commented Sep 24, 2026

Copy link
Copy Markdown
Member

Found while checking the SvelteKit 2 upgrade (#224); present before it too.

The rule that keeps the limit bars on /plans at zero width until they scroll into view was written .limits:not(:global(.is-in)) .bar. Svelte 4 cannot scope a class inside :not() and copied :not(:global(.is-in)) into the stylesheet verbatim, so browsers dropped the rule and the bars never animated; they just sat at full width. The section's state is now matched globally (:global(html:not(.no-js) .limits:not(.is-in)) .bar) and only the bar stays scoped. The reduced-motion override uses the same selector.

Checked: the compiled CSS now holds html:not(.no-js) .limits:not(.is-in) .bar.svelte-…{transform:scaleX(0)}. In the browser the bars are scaleX(0) before the rows are seen, full width once the section gets is-in, and full width for a visitor without JavaScript. svelte-check: 0 errors.

🤖 Generated with Claude Code

The rule that holds the bars at zero width until the rows are seen was
written `.limits:not(:global(.is-in)) .bar`. Svelte 4 cannot scope a class
inside :not(), and it copied `:not(:global(.is-in))` into the stylesheet
as it was; no browser parses that, so the whole rule was dropped and the
bars simply sat at full width from the start. The section's state is now
matched globally, `:global(html:not(.no-js) .limits:not(.is-in)) .bar`, and
only the bar keeps its scoped class; the reduced-motion override gets the
same selector.

Checked in the compiled CSS and in the browser: before the rows are seen
the bars are scaleX(0), with `is-in` they are full width, and a visitor
without JavaScript sees them full width.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@xuelink
xuelink merged commit 6997982 into main Sep 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant