nt1m / vivaldi-fox

An add-on that aims to add Vivaldi style toolbar colouring to the Firefox UI
https://addons.mozilla.org/en-US/firefox/addon/vivaldifox/
201 stars 21 forks source link

Strobing flashes on github.com #120

Closed bennypowers closed 2 years ago

bennypowers commented 2 years ago

Hello!

I'm a long time user. Thanks for publishing this addon.

I've noticed that on macOS 11.6.1 using Firefox 95.0b3 (64-bit), the browser's color scheme strobes back and forth on github.com.

I notice this in the browser bar, as well as in dev tools, which strobe along with the toolbar.

This only seems to happen on github.com

toastal commented 2 years ago

It also really drains battery and spins up my laptop fans

toastal commented 2 years ago

If you visit the Appearance settings, you can see the day/night themes toggle indefinitely. There are no issues on other git forges, GitLab, Sourcehut, Codeberg, etc.

bennypowers commented 2 years ago

Setting "Alternate color source" to anything other than "Favicon" stops the strobing, but also prevents VivaldiFox from working on most other websites

nt1m commented 2 years ago

This is an interesting issue:

So what ends up happening here is:

A workaround here would be setting layout.css.prefers-color-scheme.content-override to 2 in about:config to restore former behavior.

Though I think the extension can do that by itself, so I might do that for the next release.

@emilio Do you know if there's something that can be done directly on the Firefox side? I think Firefox shouldn't react to per-window/dynamic theme changes (updates given by browser.theme.update()) for prefers-color-scheme imo.

nt1m commented 2 years ago

@bennypowers @toastal This should be fixed when Version 3.2 comes out. Thanks for reporting!

toastal commented 2 years ago

@nt1m Awesome. Great work!

That seems really odd to me though. I built a reactive favicon recently and did the prefers-color-scheme wholly inside the SVG's <style> tag. Are they involving JavaScript where they don't need to?