Skip to content

Theme support (light/dark via Tailwind class strategy) #276

Description

@YaronZaki
  • Difficulty: good-first-issue · Effort: M · Priority: P2
  • Impact: every render
  • Problem Statement
    The Tailwind config (quantara/frontend/tailwind.config.js) defines
    theme variables under colors.primary, colors.backdrop-dark, etc.,
    sourced from CSS variables. There is no dark: strategy class set;
    users on light backgrounds see unreadable contrasts.
  • Why It Matters
    A theme switchable by user preference aligns with WCAG 2.2 SC 1.4.6
    (Contrast) and is a frequently requested feature on community boards.
  • Expected Outcome
    class="dark" strategy in tailwind.config.js. prefers-color-scheme
    default detection + a user-toggleable button in the global nav. CSS
    vars exposed in :root and re-scoped under :root.dark.
  • Acceptance Criteria
    • localStorage.setItem("theme", "dark") flips the body class.
    • Light renders above Axe DevTools AA contrast (4.5:1 for body text).
    • Audit on every Tailwind colour token.
  • Implementation Notes
    // tailwind.config.js (darkMode: 'class')
    module.exports = {
      darkMode: 'class',
      theme: { extend: { colors: { /* … */ } } },
    }
  • Files / Modules Affected
    • quantara/frontend/tailwind.config.js
    • new: quantara/frontend/src/contexts/ThemeContext.jsx
  • Dependencies: standalone; pairs with #82 (A11y).

Metadata

Metadata

Labels

FrontEndGrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26priority/P2Imported from PRODUCTION_ISSUES.mdqualityImported from PRODUCTION_ISSUES.mduxImported from PRODUCTION_ISSUES.md

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions