Skip to content

CSS theme cleanup: Replace duplicate light/dark palette methods with one theme config.#2186

Open
Gitjay11 wants to merge 1 commit intomito-ds:devfrom
Gitjay11:refactor/css-theme-cleanup
Open

CSS theme cleanup: Replace duplicate light/dark palette methods with one theme config.#2186
Gitjay11 wants to merge 1 commit intomito-ds:devfrom
Gitjay11:refactor/css-theme-cleanup

Conversation

@Gitjay11
Copy link
Contributor

Description

This PR fixes Theme CSS Cleanup #2170

palettes.ts used to have two separate methods, [setColorsLight] and [setColorsDark] , that did the same thing with a long list of repeated style.setProperty(...) calls. That meant the same CSS variable names were written twice which made it easy to accidentally update one theme and forget the other. This change moves all theme variables into one configuration object that stores both the light and dark values, and a single helper applies the correct set depending on the theme. As a result, the light and dark themes stay consistent, the code is shorter and adding or changing a theme variable only needs to be done in one place.

Testing

  • Switched to Mito Light and verified colors apply correctly
  • Switched to Mito Dark and verified colors apply correctly
  • Toggled mito Light/Dark multiple times in the same session

Documentation

No documentation changes required.

@vercel
Copy link

vercel bot commented Feb 15, 2026

@Gitjay11 is attempting to deploy a commit to the trymito Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant