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

Hard coded colors #2414

Closed
paul-asvb opened this issue May 20, 2021 · 4 comments
Closed

Hard coded colors #2414

paul-asvb opened this issue May 20, 2021 · 4 comments

Comments

@paul-asvb
Copy link

paul-asvb commented May 20, 2021

Bug Report

Theme colors can't overwrite hard coded colors in certain places.
Example here:

https://github.com/OHIF/Viewers/blob/master/platform/ui/src/components/studyBrowser/StudyBrowser.styl#L6

Describe the Bug

When trying to overwrite the default colors some components wont take the color from the :root css variables.

How to find all hardcoded colors:

search for
#([a-f]|[A-F]|[0-9]){3}(([a-f]|[A-F]|[0-9]){3})?
and exclude:
*.svg, *.lock, *.md

Solution suggestion:

Replace them with css variables.
e.g. change background-color: black to background-color: var(--primary-background-color)

@sedghi
Copy link
Member

sedghi commented Oct 13, 2023

You should modify the tailwind configuration. Since we moved to tailwindcss

@sedghi sedghi closed this as completed Oct 13, 2023
@nicoesiea
Copy link

nicoesiea commented Nov 3, 2023

Is it possible to ask for an example? For example, how to change the top bar color - the one with the tool icons?

@paul-asvb
Copy link
Author

@sedghi that was a great decision. @nicoesiea i haven't tried, but from my experience with tailwind: Change this file https://github.com/OHIF/Viewers/blob/master/platform/ui/tailwind.config.js and build the viewer.

@nicoesiea
Copy link

Just be careful, there are two tailwind.config.js files (the first in the APP folder and the second in UI).
I do not understand the reason for these two files.
NOTE I created a new issue for splitButton hard-coded color (#3767)

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

No branches or pull requests

3 participants