Skip to content

Create centralized theme variables for UI Toolkit

🧹 Refactoring

The current implementation of the code defines color variables in every file by a RGB value. In this Issue a central theme .uss will be created, that can be used in the future.

Tasks:

  • Make a list of current colors that are used (like background-color, text-color, accent-color and so on)
  • Add additional definitions if needed
  • Document list in the Wiki
  • Create .uss file for theme and put values in it (see commands for an example)
  • Document usage of theme in Wiki

Improvement

For easier development, a better overview and future support of light and dark mode. Currently a developer needs to search in other files for a color value. That takes time and can lead to mistakes. Another benefit of a central theme file is, that the colors can be switched easily. That is mostly important for a light and dark mode or even a high contrast mode.

Risks

Since that Issue is not altering existing cod but only creates a new file, the only risk could be that the theme is never used.

Modules/Components

Create a new .uss file like "DarkTheme.uss" (since the current UI is dark).

Important: the Issue is not ment to use or switch the current color definitions. The issue should only define and document them. It then should be used in the future to incrementally exchange every manuell definition of color values.