• Home
  • Author
  • @ajcheema90
  • Search
Menu
Topic 1 Post

dark mode

Page 1 of 1

Detect Dark Mode Using Javascript

By Ajaypal Cheema in javascript on 19 May 2020

If you want to check if dark-mode is enabled somewhere in your code, you would simply check if `matchMedia` exists on the browser and check if it has `prefers-color-scheme` set to dark.…

Page 1 of 1

Topics

javascript: 12 solidity: 7 frontend interview questions: 4 react: 3 frontend: 3 javascript interview questions: 2 array: 2 promise: 2 async: 2 asynchronous code: 2 state-management: 2 system design: 2 css: 2 html: 2 interview questions: 2 mvc: 1 ui: 1 web development: 1 dom manipulation: 1 performance: 1 await: 1 db: 1 web security: 1 architecture: 1 security: 1 observable: 1 design patterns: 1 api: 1 database: 1 redux-saga: 1 advanced javascript interview questions: 1 css interview questions: 1 web notifications: 1 notifications api: 1 notification in browser: 1 react notifications: 1 frontend app notifications: 1 javascript notifications: 1 redux: 1 react hooks: 1 react-redux: 1 accessibility: 1 web accessibility: 1 a11y: 1 wcag: 1 aoda: 1 strings: 1 dark mode: 1
Ajaypal Cheema Dot Com © 2025