openstyles/stylus

[Bug] Opening popup triggers extension mode flip

Open

#1810 opened on Aug 19, 2024

View on GitHub
 (1 comment) (0 reactions) (0 assignees)JavaScript (4,893 stars) (303 forks)batch import
Firefoxexternalhelp wanted

Description

Bug Report

Bug Description

If you have themes installed that are set to only activate when the Stylus extension is in dark mode, and the Stylus extension is currently in light mode, opening the extension pop-up on an affected webpage will cause all dark-mode-only styles to become active. This probably works the other way around as well.

System Information

  • OS: Windows
  • Browser: Firefox 129.0.1
  • Stylus Version: 1.5.48

Additional Context

To reproduce this, do the following:

  • In Firefox Settings (about:preferences#general), set the browser theme to Automatic, and make sure the Firefox theme is set to "System theme" under (about:addons). Additionally, set the Windows app theme to dark.
  • Set the Stylus extension theme settings to "By system preference"
  • Open a style in the editor, and under "Style settings" in the left pane, select dark. This should configure that style to only activate when the system is in dark mode.
  • Visit the website the style is installed for. The style should be active.
  • Go to (about:preferences#general) in Firefox, and change the browser theme from Automatic to Light.
  • Return to the website. The style should no longer be active.
  • Open the stylus pop-up from the browser toolbar. The style activates again, even though the system is still in light mode.

Not all of these steps may be necessary, but I wanted to provide as much detail as possible.

Contributor guide