Skip to content

fix: [BUG] Dark/Light theme toggle does not switch application theme #228

Description

@Akshu121796

Description

Describe the Bug
The dark/light theme toggle is currently not switching the application's theme.
Although the toggle button is clickable, the interface remains on the current theme instead of changing between light and dark mode.

Possible Cause

The toggle state is updated, but the theme change is not fully applied to the UI or the stored preference is not synchronized correctly.

Suggested Fix

  • Verify the theme toggle event handler.
  • Ensure the selected theme is applied immediately to the document.
  • Persist the selected theme consistently using localStorage.
  • Verify the toggle works on initial page load and after refresh.

Likely Files

  • public/script.js
  • public/index.html

Steps to Reproduce

Steps to Reproduce

  1. Open the application.
  2. Click the theme toggle button.
  3. Observe the UI.

Expected Behavior

Expected Behavior
The application should immediately switch between dark and light themes, updating the UI accordingly and persisting the selected preference.

Actual Behavior

Current Behavior
The theme does not switch after clicking the toggle.

Screenshots

No response

Operating System

Windows 11

Browser

Edge,chrome

Severity

Medium (feature partially broken)

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions