Skip to content

[Feature Request]: Enable Dark Mode From Code Inside _combo.css ? #928

@RileyMarquis3

Description

@RileyMarquis3

Is there an existing feature request for this?

  • I have searched the existing issues

What is your feature request?

It looks like a dark mode theme does exist inside _combo.css, starting on Line 1023 for Version 0.9.92.

Perhaps enabling a dark mode feature from the existing CSS code could be accomplished via following:

  • A toggle button or switch in the upper right corner or under My Account to switch between Light and Dark modes.
    <button id="theme-toggle">Toggle Dark Mode</button>

  • JavaScript to handle the functionality (example code below - untested).

const body = document.body;

// Check for saved theme preference in localStorage
const savedTheme = localStorage.getItem('theme');
if (savedTheme === 'dark') {
  body.classList.add('dark');
}

themeToggle.addEventListener('click', () => {
  body.classList.toggle('dark');

  // Save the current theme preference
  if (body.classList.contains('dark')) {
    localStorage.setItem('theme', 'dark');
  } else {
    localStorage.setItem('theme', 'light');
  }
});

Is this something that could be done fairly easily? Thanks in advance for any input on this idea.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions