My add-on displays an options page on the about:addons
menu, but I’m having some trouble getting it to work well when the user is running the dark mode theme on Firefox 89.
All of the UI on the about:addons
page is displaying in dark mode now (I think this is a recent change, since I can’t reproduce this in Firefox 88). But my HTML file for the options page displays in the normal colors. I’m looking for a way (either using CSS or JavaScript) that I can detect if the about:addons
page is in light more or dark mode.
I’ve already tried window.matchMedia('(prefers-color-scheme: dark)').matches
and that returns false
, so it looks like either Firefox is not using that media query when the theme is set to dark or it’s not giving add-on the ability to see that media query.