fix DaisyUI semantic color misuses#1296
Open
rin-st wants to merge 1 commit into
Open
Conversation
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This was referenced May 29, 2026
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.
Fixes problems which we discussed in #1282
Main changes
base-300below, we can change it but I think it's good as it isbase-200tobase-100for better elevationsbase-200Full changes list (generated)
Context
Follow-up to #1282. That PR landed the visual sweep and was opened with a description that explicitly flagged three DaisyUI semantic misuses the team agreed to fix before bumping
@scaffold-ui. This PR cleans them up plus a few related palette collisions.Problems
Palette collisions in
globals.cssprimary=accent=info=#93bbfbbase-100=info=#385183neutralinverted (#f9fbffwithneutral-content#385183)(
secondary=base-300in light andprimary=base-300in dark were left as-is — see Trade-offs below.)Component misuses (Carlos's three from #1282)
btn-primaryvsbtn-secondaryswapped — header CTAs werebtn-secondary; footer dev tools werebtn-primary.bg-secondaryused as a muted surface — debug banner, contract picker hover, theme toggle background.text-neutralused as muted-text — DaisyUIneutralis for non-saturated UI, not muted text.Page background
Page bg was
base-200. DaisyUI docs:base-100is the blank page surface,base-200/300are elevations above it.Surfaced during review
--input-color: color-mix(base-content 50%, transparent)).:activeon menu items flipped bg → dark and text → white (DaisyUI--menu-active-bg/-fgdefault toneutral/neutral-content).Solutions
Palette (
globals.css)accent#5b9bf0,info#3b9cf2(break collision with primary).info#3b9cf2(break collision with base-100);neutral#3d4250+neutral-content#f9fbff(canonical dark non-saturated, inverted in original).var(--color-base-100).Component class swaps
btn-primary→btn-secondaryon footer price chip / Block Explorer link, Faucet modal trigger, BackButton, PaginationButton, tx-page back button.btn-primaryretained where it's a genuine CTA (Connect Wallet, Faucet modal "Send", Search submit, 404 "Home").bg-secondary/hover:bg-secondary→base-300/hover:bg-base-300on debug banner, DebugContracts picker hover, SwitchTheme.bg-primary→bg-base-200.text-primary-contentremoved from TransactionComp<h2>and PaginationButton page-number span.border-primary→border-base-300;focus:ring-accent→focus:ring-primary.text-accent→link link-primary.Header / footer chrome
bg-base-100→bg-base-200(DaisyUI-canonical elevated chrome over white page).bg-base-200to match.bg-base-300→bg-secondary text-secondary-content; hover/focus only on inactive items.Theme switcher (
SwitchTheme.tsx)toggle bg-base-300 toggle-primary [--input-color:var(--color-primary)] dark:[--input-color:var(--color-base-content)]— off-state knob is SE-2 primary blue in light, falls back tobase-contentin dark (where Default primary = base-300 makes a primary-colored knob invisible).RainbowKit dropdowns
hover:bg-base-300 focus:bg-secondary(mirrors the header nav non-active / active pattern).text-error→!text-errorso red survives DaisyUI's:focus-visible{color:base-content}and:active{color:menu-active-fg}overrides.<ul>got[--menu-active-bg:var(--color-secondary)] [--menu-active-fg:var(--color-base-content)]so pressed state matches focus instead of flipping to dark neutral + white text.Alternative palette
Added
Default2topalettes.ts(available in the/testpicker) — same shape as Default but withsecondaryretuned to a desaturated cousin ofprimary(#bdd8f7light /#4a6896dark) sosecondary,base-300, and darkprimaryare all visually distinct. Provided as a side-by-side preview, not the default.Trade-offs
Kept Default's
secondary=base-300and darkprimary=base-300for the preferred aesthetic. Known consequences:bg-secondary) and hover (bg-base-300) render the same color. Active state is signalled by presence rather than color-by-state.btn-primaryblends intobg-base-300surfaces (home band, inline code chips). Still pops onbase-100/base-200.Both addressable later by retuning
secondary/ darkprimary(seeDefault2).🤖 Generated with Claude Code