I am trying to let the website go after what theme the visitor have on their system/browser. But when I am using the following code and have changed ui.systemUsesDarkTheme from 1 to 0 (which is light theme) in Firefox, it is still dark theme on my blog.

Anyone here who knows how I can fix this? 🙂 Maybe @kev?

@media (prefers-color-scheme: light) {
@import "../css/theme-light.css" screen and (prefers-color-scheme: light);

@edgren rather than using separate stylesheet, your best using css variables. I wrote a post on how to so it some time ago:

@kev Ok, thanks. But I have 2 files for each theme[1] so I thought instead of have duplicated variables and wanted to try out import 🙂


@kev Ok. I'll dig around a bit more before consider your solution 🙂 Once again, thanks. I tried to find that blog post before sending my toot about my issue, but didn't find it. Thanks for the link 😊

Sign in to participate in the conversation

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.