Skip to content

fix: the ghosts framed the card instead of stacking under it - #102

Merged
schmug merged 1 commit into
mainfrom
fix/ghost-geometry
Aug 23, 2026
Merged

schmug merged 1 commit into
mainfrom
fix/ghost-geometry

Conversation

@schmug

@schmug schmug commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Two geometry bugs, both from editing a growing stylesheet by string surgery.

A stale .drift-ghost-1 / .drift-ghost-2 pair survived the edit that was supposed to replace it, so the base state kept the old 10/20px offsets while the keyframes and the reduced-motion override moved to 14/26px. Nothing failed — the surface just quietly rendered offsets nobody had chosen.

And the ghosts were sized inset: 12% 4% of the deck while the card was 34dvh — so they were a larger frame around the card, visible above and below it, reading as a border artifact rather than paper underneath. The deck is now sized to the card and the ghosts sit at inset: 0, so they're exactly the card's box offset downward. Which is what a stack is.

Both ghost rules were also split in two — offsets in one place, animation two hundred lines away — which is what let half of them get updated.

New guard

No selector may declare its base state twice in this stylesheet. That's the general form of the bug, and it caught the split ghost rules immediately. Attribute and media variants are exempt; they're legitimately repeated.

npm run typecheck    clean
npm test             765 passed (765)

🤖 Generated with Claude Code

Two geometry bugs, both from editing a growing stylesheet by string surgery.

A stale .drift-ghost-1 / .drift-ghost-2 pair survived the edit that was supposed
to replace it, so the base state kept the old 10/20px offsets while the
keyframes and the reduced-motion override moved to 14/26px. Nothing failed. The
surface just quietly rendered offsets nobody had chosen.

And the ghosts were sized inset: 12% 4% OF THE DECK while the card was sized
34dvh, so they were a larger frame AROUND the card — visible above and below it,
reading as a border artifact rather than paper underneath. The deck is now sized
to the card and the ghosts sit at inset: 0, so they are exactly the card's box
offset downward, which is what a stack is.

Both ghost rules were also split in two — offsets in one place, animation two
hundred lines away — which is what let half of them get updated. One rule each
now.

New guard: no selector may declare its base state twice in this stylesheet.
That is the general form of the bug, and it caught the split ghost rules
immediately. Attribute and media variants are exempt; they are legitimately
repeated.

typecheck clean; 765 tests passing, 0 failing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 23, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
dewpt 2d79fba Aug 23 2026, 11:24 PM

@schmug
schmug merged commit dbb52f4 into main Aug 23, 2026
5 of 6 checks passed
@schmug
schmug deleted the fix/ghost-geometry branch August 23, 2026 23:25
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