Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Refactor] Reduce usage of euiThemeVars #5661

Open
3 tasks
joshuarrrr opened this issue Jan 5, 2024 · 0 comments
Open
3 tasks

[Refactor] Reduce usage of euiThemeVars #5661

joshuarrrr opened this issue Jan 5, 2024 · 0 comments
Labels
technical debt If not paid, jeapardizes long-term success and maintainability of the repository.

Comments

@joshuarrrr
Copy link
Member

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:

  1. Use OUI components (which automatically take care of theming
  2. When custom styles are necessary, use OUI SASS variables in SCSS
  3. As a last resort, use the themed JSON variables (accessed via 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:

@joshuarrrr joshuarrrr added technical debt If not paid, jeapardizes long-term success and maintainability of the repository. and removed untriaged labels Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical debt If not paid, jeapardizes long-term success and maintainability of the repository.
Projects
None yet
Development

No branches or pull requests

1 participant