fix DaisyUI semantic color misuses - #1296
Open
rin-st wants to merge 14 commits into
Open
Conversation
- --radius-field/box → 0 (light + dark) - .btn: drop shadow-md + rounded-full, add font-weight 600 - drop rounded-* / tinted-shadow utilities on cards, dropdowns, tables, avatar, faucet - thin borders for separation where shadows used to do the job Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- min-h-16 + border-b-2 border-base-300 (drop shadow) - self-stretch on navbar-start; raw <ul> instead of daisy menu menu-horizontal - nav links span full header height (h-full) with no rounding - mobile dropdown shadow-sm → shadow-lg Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Static page surfacing all DaisyUI variants (buttons, bg, text, borders, icons, form controls, badges, alerts, links) for theme work. Linked from header nav via SwatchIcon. Will be removed before merge. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- components/test/palettes.ts holds palette data (Default + Slate, light + dark) + apply/reset helpers - components/test/PaletteLoader.tsx mounts in root layout, replays stored palette on boot - /test page picker writes palette name to localStorage on Apply, removes on Reset - override applies via injected <style> with [data-theme="light"] and [data-theme="dark"] rules - minimal cards: name, swatches, Apply button Brief flash of default palette on hard refresh expected (loader runs post-hydration). Whole components/test/ folder + layout mount get deleted before merge. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Header active/hover/focus nav links: add text-secondary-content - debug/page.tsx banner: add text-secondary-content; drop now-conflicting text-neutral on inner p - DebugContracts contract picker hover: add hover:text-secondary-content - home page outline icons: drop fill-secondary (overrides outline icon's fill=none → solid blob) Surface-vs-button semantic ambiguity for secondary covered in PR description. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Light primary: #6f47ff → #6c24e0 (actual ethereum.org purple) - Light secondary: #525252 → #dde1e6 (soft pastel blue-grey, content flipped to dark) - Dark secondary: #4f4d4d → #3d4250 (blue-tinted dark grey) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Same #dde1e6 / #3d4250 secondary as Ethereum. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This was referenced May 29, 2026
Merged
Member
|
@rin-st I think it's better to rebase or merge to base first to be able to review this PR. |
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