Skip to content

Theme CSS Cleanup #2170

@ngafar

Description

@ngafar

Bugbot flagged this in mito-ai/src/Extensions/MitoThemes/index.ts:

The MitoPalettes class contains two methods (setColorsLight and setColorsDark) that are structurally identical, each with ~110 lines of repetitive document.documentElement.style.setProperty() calls. This duplicates the list of CSS variable names across both methods, making maintenance error-prone. A data-driven approach using a theme configuration object with variable names as keys and light/dark values would reduce duplication, make it easier to add new variables, and ensure both themes stay in sync.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions