Skip to content

fix(web): style compare-range sliders to match the Geist controls - #31

Merged
PunGrumpy merged 1 commit into
interface/01-selection-semanticsfrom
interface/02-compare-range-styles
Aug 7, 2026
Merged

fix(web): style compare-range sliders to match the Geist controls#31
PunGrumpy merged 1 commit into
interface/01-selection-semanticsfrom
interface/02-compare-range-styles

Conversation

@PunGrumpy

@PunGrumpy PunGrumpy commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Problem

The interface review flagged (pre-existing, MEDIUM) that .compare-range — the class on both the before/after comparison slider and the quality slider — had no CSS definition anywhere in the repo. Both inputs rendered with raw browser default styling in the middle of an otherwise fully-tokened Geist interface.

Root Cause

The class was referenced from optimizer-preview.tsx and optimizer-controls-panel.tsx but never written; the sliders were silently falling back to UA styles (blue on Chrome, gray-blue on Firefox, different shapes per platform).

Solution

Adds a compare-range @utility in globals.css, following the existing scrollbar-geist idiom and using only existing --ds-* tokens: a 4px rounded track on gray-alpha-300, a 16px circular thumb on background-100 ringed with gray-alpha-400 plus the small shadow (visually matching the comparison divider handle), hover ring at gray-alpha-500, and a 150ms box-shadow transition — which the reduced-motion safe-list preserves. Dark mode follows automatically from the tokens; keyboard focus keeps the existing global input:focus ring.

Result

Both sliders now read as part of the Geist family in light and dark mode. CSS compiles (next build clean); a visual pass on the rendered sliders per browser remains the feel-check.

🤖 Generated with Claude Code

The compare-range class on the before/after and quality sliders had no
CSS definition anywhere, so both inputs rendered with raw browser
default styling next to fully-tokened Geist controls. Adds a
compare-range utility following the scrollbar-geist idiom: 4px rounded
track on gray-alpha-300, 16px thumb on background-100 with the
gray-alpha-400 ring and small shadow, hover ring at gray-alpha-500, and
a 150ms box-shadow transition (kept by the reduced-motion safe-list).
Dark mode follows from the tokens; the focus ring comes from the
existing global input:focus rule.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pigo Ready Ready Preview Aug 7, 2026 5:22pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
pigo-api Skipped Skipped Aug 7, 2026 5:22pm

@vercel
vercel Bot temporarily deployed to Preview – pigo-api August 7, 2026 17:22 Inactive
@changeset-bot

changeset-bot Bot commented Aug 7, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8f22053

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@PunGrumpy
PunGrumpy merged commit 6847d29 into main Aug 7, 2026
10 checks passed
@PunGrumpy
PunGrumpy deleted the interface/02-compare-range-styles branch August 7, 2026 17: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