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

[Feature] Theme support #799

Open
gaussandhisgun opened this issue Jun 3, 2024 · 0 comments
Open

[Feature] Theme support #799

gaussandhisgun opened this issue Jun 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@gaussandhisgun
Copy link

gaussandhisgun commented Jun 3, 2024

Is your feature request related to a problem? Please describe.

Firefox, as any browser with customization options, has themes. Some of them are definitely worse than others, but they are there. And Gnome Theme does not support them, to the point of even breaking should a theme be applied to Firefox. But what if it did?

Describe the solution you'd like

A few tweaks might be applied to Firefox Gnome Theme to detect if a Firefox theme is applied and change the colors accordingly. Actually, here's one way to do that: whenever any theme except for "System (Auto)" is applied, the <html> that the entire browser is encased into gets a new attribute, lwtheme="true".

Describe alternatives you've considered

I tried to do this myself, by applying this piece of CSS:

#navigator-toolbox {
  &:-moz-window-inactive {
    background-color: InactiveCaption !important;
    color: InactiveCaptionText !important;
  }
}

#navigator-toolbox {
  :root[lwtheme] & {
    &:-moz-window-inactive {
      background-color: var(--lwt-accent-color-inactive, var(--lwt-accent-color)) !important;
    }
  }
}

#navigator-toolbox {
  :root[lwtheme] & {
    background-image: var(--lwt-additional-images) !important;
    background-repeat: var(--lwt-background-tiling) !important;
    background-position: var(--lwt-background-alignment) !important;
    background-color: var(--lwt-accent-color) !important;
    color: inherit !important;
  }
}

:root[lwtheme] {
  --gnome-headerbar-background: transparent;
  --gnome-tabbar-background: transparent;
}

#nav-bar {
  background-color: var(--toolbar-bgcolor);
}

But I suck at CSS and this breaks every theme that does not have a full-headerbar background. Still, this is a point to start more than anything actually usable.

Additional context

Implementing this will close #792, #690 and probably something else that I haven't seen yet.

And this is what my proof-of-concept piece of code looks like in person:
изображение
(the cat theme)

@gaussandhisgun gaussandhisgun added the enhancement New feature or request label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant