Skip to content

docs: fix dark-mode background on Add-to-wallet buttons - #2222

Merged
viral-sangani merged 1 commit into
mainfrom
GigaHierz/fix-add-wallet-button-darkmode
Jul 20, 2026
Merged

docs: fix dark-mode background on Add-to-wallet buttons#2222
viral-sangani merged 1 commit into
mainfrom
GigaHierz/fix-add-wallet-button-darkmode

Conversation

@GigaHierz

Copy link
Copy Markdown
Contributor

Problem

On the Docs Home page, the two "Add Celo … to your wallet" buttons rendered white in dark mode (they should be dark, matching the page background and the native <Card> components above them). Light mode was fine.

Cause

In snippets/AddNetworkButton.jsx, the container used dark:bg-background-dark, which did not win over the Mintlify .card base white background — so bg-white showed through in dark mode. The element already forces its border with !important (hover:!border-primary), a hint the base .card styles need ! to override.

Fix

One-line change to the shared component:

  • Before: bg-white dark:bg-background-dark
  • After: bg-white dark:!bg-[#0b0d10]

#0b0d10 equals docs.jsonbackground.color.dark, so the buttons match the page and native cards in dark mode. The !important guarantees the override. Light mode is unchanged.

Because both the Home tab (home/celo.mdx) and the Build tab (build-on-celo/network-overview.mdx) import this single snippet, all tabs are fixed at once.

Verification

Ran mint dev locally and confirmed both buttons render dark in dark mode (subtle light border, matching native cards) and remain white in light mode, on both the Home page and /build-on-celo/network-overview. Hover border highlight still works.

🤖 Generated with Claude Code

The AddNetworkButton cards rendered white in dark mode because
dark:bg-background-dark did not override the Mintlify .card base white.
Use dark:!bg-[#0b0d10] (matching docs.json background.color.dark) so the
buttons match the page and adjacent native cards in dark mode; light mode
is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@GigaHierz
GigaHierz requested a review from a team as a code owner July 20, 2026 10:53
@viral-sangani
viral-sangani merged commit c190c43 into main Jul 20, 2026
4 checks passed
@viral-sangani
viral-sangani deleted the GigaHierz/fix-add-wallet-button-darkmode branch July 20, 2026 21:26
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.

2 participants