Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49305

Detect if Dark Mode is Actually Active (not preference)

$
0
0

There are various strategies for applying “darkmode” css to an app. It could be hardcoded or it could be based on the user’s “system” preference or it could be toggled via JavaScript.

There are many posts online about how to detect the browser/system preference but how can we know if darkmode is actually currently active (regardless the preference)?

I don’t see anything in the DOM, classname or otherwise called “dark” which we could query.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49305

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>