Questions tagged [darkmode]

General questions related to support of Dark Mode mode themes for OS, framework, and application programming.

Relating to programming for Dark Mode themes. Support of swapping from standard or default modes into Dark Mode.

As more OSes, frameworks, and programs support Light and Dark mode theme selection, programming to handle all theme cases gets complicated, especially on cross-platform apps.

566 questions
287
votes
7 answers

How to detect if the OS is in dark mode in browsers?

Similar to "How to detect if OS X is in dark mode?" only for browsers. Has anyone found if there is a way to detect if the user's system is in the new OS X Dark Mode in Safari/Chrome/Firefox? We would like to change our site's design to be dark-mode…
funkju
  • 3,463
  • 2
  • 15
  • 19
40
votes
3 answers

How do I switch to Chromes dark scrollbar like GitHub does?

I just came across, that GitHub uses a dark scrollbar in Chrome, when you're using GitHubs dark mode. If you switch the color mode, the scrollbar will switch too. How can I achive this behaviour? I could not find any way to tell the browser to use…
MarvinJWendt
  • 2,357
  • 1
  • 10
  • 36
31
votes
6 answers

How can I enable dark mode when viewing a pdf file in firefox

I have enabled the dark mode in Firefox version 76.0 as well as installed the dark reader extension. The extension allows web pages to go dark. These changes do not affect any PDFs that have been opened in Firefox.
SynergerySid
  • 1,219
  • 1
  • 6
  • 8
17
votes
4 answers

Disable prefers-color-scheme: dark in django admin

I have dark mode enabled on Mac, but it looks awkward in django admin panel with ckeditor. Is it any option to disable it in Chrome or Django admin? I have already tried themes and browser extensions with no success.
VictoriaSh
  • 322
  • 3
  • 10
15
votes
2 answers

Styling the body element in svelte

My goal is to make a darkmode for my web app. To get my setup enter npm init vite and pick svelte as a framwork. Then follow the command line instructions. Go to src > App.svelte: Try the following: body { background: black; } You will get…
Felkru
  • 310
  • 2
  • 12
13
votes
3 answers

Dark Mode: useColorScheme() always returns light on Android

I am trying to get Dark Mode to work and it doesn't work on Android. It always returns "light". On iOS it works fine. import React from 'react'; import { useColorScheme } from "react-native"; export default function App() { const theme =…
André
  • 1,078
  • 10
  • 22
8
votes
2 answers

Tailwind not working properly in a monorepo architecture

I am using a monorepo architecture using yarn workspaces, in which Tailwind CSS is at the root of the project. In one of the workspaces I am using React and I have added Tailwind utilities into its styles. Tailwind is working fine in the project…
prashant
  • 210
  • 2
  • 11
8
votes
0 answers

Embedding an Instagram-Post in dark mode

Instagram has a dark mode, which is - at the time - only accessible over the URL parameter '?theme="dark"' if you are using it in the browser-version/on pc. As my page has a dark mode as well, i'd obviously like to embed posts in the dark mode style…
OnFire
  • 129
  • 5
8
votes
2 answers

Tailwind css dark mode does not enable

I am trying to enable dark mode based on the system default using tailwind. To accomplish this I am using the plugin: Tailwind dark mode. My config fail for tailwind is as follows: defaultTheme = require('tailwindcss/defaultTheme'); module.exports =…
Robin
  • 101
  • 1
  • 1
  • 3
7
votes
3 answers

Not able to turn off/remove dark mode in Create Next App

Previously using create-next-app, I always got a nice light themed 'Welcome to Next.js' application bootstrapped, but today when I initialized a next.js app with create-next-app, the application is using dark mode automatically since it is my system…
Sayantan
  • 113
  • 1
  • 6
7
votes
1 answer

How to automatically toggle the Dark Reader Chrome plugin?

Question How can we automatically toggle Dark Mode at predetermined times? Background Every day, around 5 PM, I switch on the dark mode of the Dark Reader Chrome extension. I toggle it off again the next morning to get more bright light in the…
7
votes
3 answers

Samsung Internet forces dark mode

My website is designed in light mode and not supposed to react to any form of dark mode. This works on all websites, except for Samsung Internet. Whenever I open the website on Samsung Internet, it automatically swaps out the white background for a…
7
votes
2 answers

Why does reading localStorage values require a page refresh to show CSS changes toggled by jQuery?

I'm trying to use the value of localStorage to display one of two Twitter feeds, one for a light mode theme, the other for dark mode. It works, but I have to refresh the webpage for the correct CSS - either twitter-dark-display-none or…
BlueDogRanch
  • 721
  • 1
  • 16
  • 43
6
votes
0 answers

User's way to disable 'prefers-color-scheme' or Dark Mode?

I've seen a ton of Q&As on this site about how programmers can turn dark mode of their web pages on and off. But how do I, as a user, disable dark mode for my browser? I'm used to having my OS set to a dark theme, but I want my browser's pages to…
Kane Green
  • 71
  • 7
6
votes
0 answers

Show a specific image in dark mode on GMAIL

I would like to know if there is a solution to display a specific image in dark mode on GMAIL (and hide an image in light mode). I tried by applying the guide https://www.litmus.com/blog/the-ultimate-guide-to-dark-mode-for-email-marketers/ (I saw…
hrks
  • 61
  • 2
1
2 3
37 38