Skip to content

fix(ui): keep readable text contrast on Discard edits hover#1503

Open
AmanVarshney01 wants to merge 1 commit intomainfrom
fix/discard-edits-hover-contrast
Open

fix(ui): keep readable text contrast on Discard edits hover#1503
AmanVarshney01 wants to merge 1 commit intomainfrom
fix/discard-edits-hover-contrast

Conversation

@AmanVarshney01
Copy link
Copy Markdown
Member

@AmanVarshney01 AmanVarshney01 commented May 1, 2026

variant="outline" injected hover:text-accent-foreground, which the local className didn't override — text turned light over amber on hover. Dropped the variant and added border explicitly to match the sibling Save edits button.

Before
03-discard-before

after

04-discard-after

The "Discard edits" button used `variant="outline"`, which injects
`hover:text-accent-foreground`. The local className overrode the hover
background (`hover:bg-amber-200`) but not the hover text color, so on
hover the text turned the light accent-foreground color over an amber
background, producing poor contrast.

Drop `variant="outline"` (default variant has no hover text-color rule)
and add `border` to the className. This matches the sibling "Save edits"
button's pattern. Text now stays `text-amber-950` in both default and
hover states.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

Compute preview deployed.

Branch: fix/discard-edits-hover-contrast
Service: fix-discard-edits-hover-contrast
Preview: https://cmon36qhh0dfj08du3u8pju4z.cdg.prisma.build
Version: https://cv-b2223e36836d.cdg.prisma.build

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