Fix ghost button hover contrast - #2428
Merged
Merged
Conversation
niemyjski
force-pushed
the
issue/dark-mode-ghost-hover-contrast
branch
from
July 30, 2026 22:00
43d0ece to
5581656
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
accenttheme tokens.border-transparentonly on ghost hover withaccent-foreground/40.variant="ghost"; the transparent resting state and every other Button variant remain unchanged.Root cause
The pagination
Nextcontrol is a shared Button withvariant="ghost". It does not have a Next-specific transparency class:border border-transparentso filled, link, and ghost variants do not gain an unintended resting border.dark:hover:bg-muted/50and left that border transparent.The fix belongs in the shared ghost hover variant: it uses the theme's
accenthover surface and overrides the transparent border while hovered. Changing the base transparency would incorrectly add borders to unrelated Button variants.Screenshots
Before — dark-mode
NexthoveredAfter — dark-mode
NexthoveredVerification
/next/stackcapture at 1280×577 with the realNextpagination button confirmed in:hover.Nextbutton is aBUTTONusingvariant="ghost": at rest its background and border both compute to transparent; on hover the shared variant overrides both.rgb(26, 31, 36), borderrgb(91, 94, 99), foregroundrgb(230, 237, 243).rgb(2, 5, 10)).npm run validate