[Refactor] Reduce usage of euiThemeVars
#5661
Labels
technical debt
If not paid, jeapardizes long-term success and maintainability of the repository.
euiThemeVars
#5661
There are multiple ways that OSD files can integrate with OUI themes. But as much as possible, theme-specific logic should be avoided in OSD js files. In order of preference:
euiThemeVars
from@osd/ui-shared-deps/theme
)Option 3 should be reserved for cases where we're relying on 3rd-party libraries that require styling via JS. We should refactor other usage to Option 2:
ui-shared-deps
already handles the job of switching between light and dark mode themes, it should be possible to just define a single theme, and remove the hard-coded background color in favor of the appropriate theme variable.The text was updated successfully, but these errors were encountered: