In Firefox 67, one can use media queries to detect user preference on light or dark theme.
In my version of Firefox (under Ubuntu), it seems that my preference is light
Another way to do this is to go to about:config
, and set the devtools.inspector.color-scheme-simulation.enabled
property to true
.
This adds a button to the devtools inspector tab which allows you to quickly switch between emulating light mode and dark mode on the current page.
Eventually this feature will no longer be hidden behind a flag. You can track its progress on Bugzilla. As of November 2020, there is also a new bug for getting this flag enabled by default.