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

TST is unexpectedly using darker background color on Firefox v89.0 and default theme #2942

Closed
cosmo0920 opened this issue Jun 14, 2021 · 8 comments

Comments

@cosmo0920
Copy link

Short description

After I upgrade Firefox to v89.0, TST starts to use "darker" background color with default theme.
But, tab bar still use gray color that I expected to be used in TST.

Steps to reproduce

  1. Start Firefox with clean profile.
  2. Install TST 3.8.2.
  3. Use TST with Firefox v89.0 and use default theme.
  4. Background color glitch is occurred.

Expected result

When with default theme and not to be enabled night mode, the following appearance I'd expected.

Screenshot from 2021-06-14 18-24-41

Actual result

When with default theme and not to be enabled night mode, I got the following appearance. (TST uses darker background)

Screenshot from 2021-06-14 18-20-19
Screenshot from 2021-06-14 18-21-28

Environment

  • Platform (OS): Ubuntu 18.04 Bionic
  • Version of Firefox: 89.0
  • Version (or revision) of Tree Style Tab: 3.8.2

Screenshot from 2021-06-14 18-14-07

@piroor
Copy link
Owner

piroor commented Jun 14, 2021

This is intentional. Currently TST's theme color for Linux is made for the default theme of Ubuntu. Here is a screenshot on Ubuntu 20.04LTS:
image
Sadly Firefox doesn't provide ability to know the exact background color of the native tab bar on GNOME3 to extensions. So I had to decide just one from possible colors. I thought that inverted menu color (system colors Menu and MenuText: I use Menu as the text color, MenuText as the background color) looks natural on this environment.

Here is a workaround user styles to override those colors:

:root[color-scheme="system-color"][data-user-agent*="Linux"]
  tab-item:not(.active):not(.bundled-active):not(.highlighted),
:root[color-scheme="system-color"][data-user-agent*="Linux"]
  .after-tabs button,
:root[color-scheme="system-color"][data-user-agent*="Linux"]
  .after-tabs [role="button"],
:root[color-scheme="system-color"][data-user-agent*="Linux"]
  #subpanel-selector-anchor,
:root[color-scheme="system-color"][data-user-agent*="Linux"]
  #background {
  --toolbar-non-lwt-bgcolor: (something background color);
  --toolbar-non-lwt-textcolor:(something foreground color);
}

@cosmo0920
Copy link
Author

Sadly Firefox doesn't provide ability to know the exact background color of the native tab bar on GNOME3 to extensions. So I had to decide just one from possible colors. I thought that inverted menu color (system colors Menu and MenuText: I use Menu as the text color, MenuText as the background color) looks natural on this environment.

Oh, that's too bad.
I'm using Adwaita GNOME3 theme for a long time.

Screenshot from 2021-06-14 18-49-38

@cosmo0920
Copy link
Author

I also found the workaround for this issue which is choosing light theme as already noted on "Expected result".
Thanks for the quick help.

@piroor
Copy link
Owner

piroor commented Jun 14, 2021

Anyway, I still need something better solution about this problem...

@cosmo0920
Copy link
Author

Hmm..., should I reopen this issue to store our TODOs?

@piroor
Copy link
Owner

piroor commented Jun 15, 2021

I've added a new code snippet: https://github.com/piroor/treestyletab/wiki/Code-snippets-for-custom-style-rules#change-background-and-foreground-color-of-the-sidebar-on-the-combination-proton-and-linux-2942

I think this issue should stay closed because currently there is no available better solution. Just for references I put links to bugs of Firefox related to this:

1542044 - browser.theme.getCurrent() & onUpdated should take in account dark_theme manifest field
https://bugzilla.mozilla.org/show_bug.cgi?id=1542044
1435216 - Return something useful for theme.getCurrent() when the default theme is applied
https://bugzilla.mozilla.org/show_bug.cgi?id=1435216

@cosmo0920
Copy link
Author

Sure. That's make sense.

@cosmo0920
Copy link
Author

And I edited this part ( https://github.com/piroor/treestyletab/wiki/Code-snippets-for-custom-style-rules#change-background-and-foreground-color-of-the-sidebar-on-the-combination-proton-and-linux-2942 ) for readability.

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

2 participants