Skip to content

Commit dc61767

Browse files
samejrclaude
andcommitted
fix(webapp): halve the contrast handle's hover step again on the light themes
A full stop to charcoal-100 still read as a blob landing rather than a handle lighting up. #f4f4f6 is the midpoint of white and charcoal-100 - half a stop, which is as fine a step as the ramp allows without inventing one. Opaque rather than charcoal-100/50, which was the obvious way to write it: the hover rule replaces the white fill rather than sitting over it, so a 50% alpha would let the track line show through the handle. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 263a365 commit dc61767

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

apps/webapp/app/components/primitives/Slider.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,13 @@ const variants = {
1616
// The secondary-button hairline+shadow keeps the dot visible on the light
1717
// track. Hover moves the handle off its resting tone in whichever direction
1818
// reads as more prominent: brighter on the dark themes, dimmer on light -
19-
// but only one stop dimmer there, since the handle sits on white and a
20-
// second stop reads as a dark blob rather than a hover.
19+
// but only half a stop dimmer there, since the handle sits on white and even
20+
// one full stop reads as a dark blob rather than a hover. #f4f4f6 is the
21+
// midpoint of white and charcoal-100, opaque on purpose: charcoal-100/50
22+
// would replace the white fill rather than sit over it, letting the track
23+
// line show through the handle.
2124
thumb:
22-
"h-4.5 w-4.5 border border-border-bright bg-white shadow-sm hover:bg-charcoal-100 dark:border-transparent dark:bg-charcoal-300 dark:shadow-none dark:hover:bg-charcoal-200",
25+
"h-4.5 w-4.5 border border-border-bright bg-white shadow-sm hover:bg-[#f4f4f6] dark:border-transparent dark:bg-charcoal-300 dark:shadow-none dark:hover:bg-charcoal-200",
2326
thumbSize: 18,
2427
// Track-coloured line, notched off the track by borders in the colour of
2528
// the page behind it (settings rows sit on background-dimmed).

0 commit comments

Comments
 (0)