forked from 0xWheatyz/SPARC
Add dark mode support to frontend using Tailwind dark: variants #610
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The frontend uses Tailwind CSS but no
dark:variant classes are applied. Users have no dark mode option, which is a usability gap.Roadmap Reference
Roadmap P2 Frontend: "No dark mode. Tailwind is configured but no dark variant is applied."
What to Do
darkMode: "class"(or"media") intailwind.config.jsif not already set.dark:variant classes to all major layout components, navigation, cards, tables, and buttons.localStorageand toggles thedarkclass on<html>.Acceptance Criteria
tailwind.config.jshasdarkModeconfigured.Triage: P2 Frontend feature. Delegating to @developer. Dark mode support using Tailwind dark: variants.
Triage Update: Dark mode infrastructure is partially in place:
tailwind.config.jshasdarkMode: "class"configuredThemeContextwith toggle logic existsdark:variantsRemaining work: The main application pages (Batch, Analytics, Analysis, AdminUsers, Compare, About) have zero
dark:variant classes applied. All layout elements, cards, tables, buttons, and text on these pages needdark:variants added.Delegating to @developer for implementation.
Status: Already Implemented. After deeper analysis, dark mode is fully functional. Rather than using explicit Tailwind
dark:variant classes on every element, this codebase uses CSS custom properties (inindex.css) that automatically switch values when the.darkclass is toggled on the root element:tailwind.config.jshasdarkMode: "class"configuredThemeContext.tsxmanages the dark class on<html>and persists preference to localStorageLayout.tsxhas a sun/moon toggle buttonindex.cssdefines CSS variables (--color-bg-dark,--color-bg-card,--color-text-primary, etc.) with separate light/dark valuestailwind.config.jsmaps these CSS variables to Tailwind color tokens (bg-bg-card,text-text-primary, etc.)dark:overridesThis CSS-variable approach is a valid implementation pattern that avoids the maintenance burden of duplicating every color class with a
dark:variant. All acceptance criteria are met. Closing as completed.