Skip to content

Eight filled primary buttons use opacity: 0.9 as hover instead of --primary-hover #2690

Closed

Description

@malibio

Overview

Eight filled hsl(var(--primary)) buttons express hover as opacity: 0.9 — a fourth hover idiom that the audit in #2673 did not catalogue (it found three: two alpha forms and two filter: brightness()).

File Line
settings/model-manager.svelte 747
chat/chat-input.svelte 132
viewers/collection-node-viewer.svelte 594
viewers/query-node-viewer.svelte 816
viewers/query-node-viewer.svelte 855
viewers/ai-chat-pty-session.svelte 693
query/query-editor.svelte 409
onboarding/onboarding-wizard.svelte 832

Why it is milder than the idioms #2673 removed — but still wrong

opacity fades the label along with the fill, so the contrast ratio roughly holds rather than collapsing. That makes this less harmful than hsl(var(--x) / 0.85), which fades only the background and degrades contrast.

It is still theme-blind in the same way, and DESIGN.md now states the rule it violates:

  • The button becomes translucent, so whatever sits behind it shows through — the same latent bug Add --destructive-hover / --primary-hover tokens and unify filled-button hover states #2673 fixed for the four modal buttons.
  • The direction is not a decision. Fading toward the surface lightens on a white background and darkens on a dark one, so hover moves opposite ways between themes as an emergent side effect.
  • It bypasses --primary-hover, so these buttons will not follow the documented law if the token is ever retuned.

Expected shape of the fix

Mostly mechanical — replace opacity: 0.9 with background: hsl(var(--primary-hover)) — but each site needs individual checking, which is why this is filed rather than folded into #2685:

  • The base rule's property must match (background vs background-color) or the hover will not override.
  • Some sites carry transition: opacity 0.15s ease (e.g. query-editor.svelte:405) that becomes dead once opacity stops changing. That transition is also already a design-token baseline violation in several files, so removing it should shrink the baseline rather than grow it — verify with bun run quality:design-tokens.
  • chat-input.svelte pairs its hover with :disabled { opacity: 0.4 }; the disabled state legitimately keeps using opacity and should be left alone.

Estimated small-to-medium: eight files, no design decision required, but eight separate verifications.

Acceptance Criteria

  • All eight sites use hsl(var(--primary-hover)) instead of opacity: 0.9
  • Each hover declaration matches its base rule's background property
  • Orphaned transition: opacity removed where opacity no longer changes; design-token baseline does not grow
  • :disabled { opacity } states left intact — they are a different affordance
  • Buttons are fully opaque at rest and on hover

Related

Activity

  1. mstomar125 commented on Sep 21, 2026

    @mstomar125
    Contributor

    Frontend baseline: 256 test files / 5226 tests passed. Design-token baseline: 50 known violations.

  2. self-assigned this
    on Sep 21, 2026
  3. added a commit that references this issue on Sep 21, 2026
    bd5d89f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions