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

Support for Light themes #3

Open
icona79 opened this issue Apr 18, 2023 · 0 comments
Open

Support for Light themes #3

icona79 opened this issue Apr 18, 2023 · 0 comments

Comments

@icona79
Copy link

icona79 commented Apr 18, 2023

It could be good to have support for your computer's light/dark themes (in macOS, it can be automatic; I don't know about others).

You can edit the header of userChrome.css like:

:root {
  color-scheme: light dark; /* both supported */
  --sfwindow: #19171a;
  --sfsecondary: #201e21;
  --icon-filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(190deg) brightness(104%) contrast(102%);
  --icon-fill: fill: white !important;
}

@media screen and (prefers-color-scheme: light) {
  :root {
    --sfwindow: #ffffff;
    --sfsecondary: #edebf2;
    --icon-filter: invert(0%) sepia(0%) saturate(0%) hue-rotate(190deg) brightness(104%) contrast(102%);
    --icon-fill: fill: grey !important;
  }
}

@media screen and (prefers-color-scheme: dark) {
  :root {
    --sfwindow: #19171a;
    --sfsecondary: #201e21;
    --icon-filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(190deg) brightness(104%) contrast(102%);
    --icon-fill: fill: white !important;
  }
}

And change all the icons' CSS from:

fill: white !important;
filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(190deg) brightness(104%) contrast(102%) !important;

to:

fill: var(--icon-fill);
filter: var(--icon-filter)

I did it on my laptop, and it works like a charm 😊
The colour combination for the light theme could be any of your choices: This White and Light Gray options works good for me 😉

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

1 participant