Firefox: How to test prefers-color-scheme?

后端 未结 3 1875
无人共我
无人共我 2021-02-03 19:02

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

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-03 19:23

    Just for the sake of completeness: If everything fails, there is a Firefox add-on called “Dark Website Forcer” (also on GitHub).
    It changes the style by reading the CSS of the website and re-applying the parts for the dark version again, if you want to have a dark one. As such, it also can only force a dark website, not the light one. The Readme has a detailed explanation why.

    Disclosure: I'm the author of this add-on.

提交回复
热议问题