Skip to content

Dark mode via light-dark() tokens #95

Open

Description

@johnhringiv

Context

The app is light-only. Bootstrap 6 always compiles dark mode and resolves tokens with light-dark(), driven by color-scheme — no separate dark stylesheet.

:root already uses semantic DaisyUI-style tokens (--color-base-100/200/300, --color-base-content, --color-primary…, each with a -content pair), and most component colours derive from them via color-mix(), so this is mostly picking dark values.

Proposed

  • :root { color-scheme: light dark; }; tokens become --color-base-100: light-dark(oklch(96% 0.003 245deg), oklch(22% 0.015 245deg)); etc.
  • Toggle (Light / Dark / Auto) in the user menu, persisted (localStorage or user profile), applied before first paint.
  • Audit list:
    • color-mix(…, #000 5%) darkening for hover (~L501–529) — in dark mode hover should probably lighten; use a --hover-mix token that flips
    • baked SVG carets (Caret chevron: mask-image + currentcolor, drop baked --caret-chevron-inverse #89)
    • D3 chart colours in resources/js/stats-charts.js — read CSS vars via getComputedStyle and re-render on scheme change
    • lightning-logo fill/glow, hero gradients (.from-primary/.to-secondary)
    • shadows (Bootstrap deepens --shadow-strength in dark)
    • emails are separate and unaffected

Inspired by the Bootstrap 6 alpha (migration guide) — not adopting Bootstrap, just borrowing the idea.

🤖 Generated with Claude Code

Activity

  1. added
    enhancement
    on Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions