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
0
votes
1 answer

How do I properly structure a dark mode toggle using Javascript?

I've been trying to have my toggle trigger a dark mode on and off using JavaScript but clearly I'm doing something wrong. I attempted to trigger it by applying the light class to my body and using addClassListener. Below is a simplified version of…
AsheOmFree
  • 21
  • 5
0
votes
1 answer

Flutter Text inside Text Field becoming white automatically for iOS Dark mode

When I am using iOS dark mode. Then flutter Text field text color is not visible. How to solve this problem ?
MD MEHEDI HASAN
  • 2,044
  • 2
  • 19
  • 34
0
votes
1 answer

settings UI, how to untoggle

I am working on a settings UI, I want to make sure that after I untoggle a certain variable, the application goes back to normal. If I toggle the app should go to dark mode (working well), but after untoggling it should go back to light, but so far…
Luthermilla Ecole
  • 666
  • 1
  • 6
  • 14
0
votes
0 answers

Laravel 8 Dark Mode

I want to make dark mode in Laravel 8. I can turn dark mode on or off using the icon. When I click the button, dark mode works, but when I refresh the page, it returns to its original state. How can I stabilize this by keeping it in the database or…
daSilva
  • 77
  • 2
  • 7
0
votes
1 answer

How to render different icons in an email using prefers-color-scheme Media Query?

I'm trying to change icons on emails I send out through my application. At the moment, the method I've used is to create two different set of icons, one for the light mode and one for the dark mode and set one or the other's CSS display property to…
Ismail Farooq
  • 145
  • 1
  • 3
  • 13
0
votes
1 answer

React Native - redux state updates but tabbar does not

I try to implement dark mode for my app. I use redux state management to save my current theme. I use the redux connect function in my components to get this theme and render the components in light or dark mode. This works pretty good but…
user42932
  • 31
  • 2
  • 7
0
votes
1 answer

How to assign css to javascript which have two or more selectors

I'm trying to assign a very large block of html and css code with help of javascript. The code works properly in the day mode but I have a little issue with that when it comes to night mode. Given container and img aren't changing color and other…
Maniac Piano
  • 127
  • 1
  • 2
  • 10
0
votes
0 answers

How do I retrieve email message body content that supports dark mode from microsoft graph api

I am trying to use microsoft graph API to build my email client app using xamarin.forms for both android and ios. My apps support dark theme. Graph API is giving me the Html result for the body content and the styles are only light mode…
0
votes
1 answer

HTML Dark Mode With Pure JavaScript

I'd like to add dark mode to my website with javascript. It works technically, but not the way I wanted it to. It only set the body color to black. But the challange is to set color to the "< div >" tags. Honestly I don't really know JavaScript, so…
scrummy
  • 795
  • 1
  • 6
  • 20
0
votes
1 answer

Change iframe source when dark mode is enabled and change it back when dark mode is disabled

GOAL: I would like to change the source of an iFrame when onclick="toggleDarkMode() is activated and change it back when onclick="toggleDarkMode() is disabled. PROBLEM: My current "Dark Mode" button only changes the iFrame source once, when…
0
votes
1 answer

Oracle APEX 20.1: Theme Vita Dark CSS-Error on Textfield with autocomplete

When you apply the Vita Dark-theme to your app and have selection lists, such as in a textfield with autocomplete, the background and the text in the select list are white and thus hard to read. Screenshot to show the wrong colors Is there any…
LBR8
  • 61
  • 4
0
votes
1 answer

Outlook Dark Mode Office 365 on macOS Catalina Background color

I'm wondering if any HTML email developers can help me with this. I'm using Email on Acid to test HTML emails and the background color set inside of my buttons (when light in color) are being inverted. This only happens in "Outlook Office 365 on…
Drew
  • 27
  • 6
-1
votes
1 answer

How can I detect when the system changes dark/light mode in Swift?

I know there are plenty of answers pointing to traitCollectionDidChange, but that is going to be called when the userInterfaceStyle of a view controller changes, and I would like to let the user select between System, Light and Dark mode, so I am…
-1
votes
0 answers

PHP - How would I save user theme preferences in an SQL database so when users login it changes themes?

I'm currently making a music streaming website for fun and trying to add some cool features to it. One of them I came up with is storing dark mode, light mode and background theme preferences (CSS) in the users SQL data so when they login to any…
-1
votes
0 answers

Custom react componet to toggle theme between light and dark mode with tailwind CSS

I have created a custom React component to toggle themes, which works perfectly for me. However, I'm concerned about best practices. Here is my code: import { ButtonHTMLAttributes, useEffect } from "react"; type ThemeTogglerProps = Omit< …