Dark Mode and BS4 Themes

With dark mode becoming more popular, and the announcement of AS V8 Dark Mode Support, would it be possible to have AS handle two themes, like darkly vs flatly. One for light mode and one for dark mode.

My first thought/question was mainly to how to add the additional CSS file for the second BS4 theme to a project. I was assuming I would have to make the dark mode change in my app.

The other method of inheriting dark mode from the browser also makes sense. I need to try this method out. Obviously dark mode is new and everyone has their ideas of what it is and how to implement it. And with new apps, we’re pretty much going to have to use BS4 controls, so how does dark mode play with BS4?

Funny you should ask!


I followed the suggestion in the blog post and used inherit on the project and form backgrounds. It works great in Windows 10. I deployed as a web app using start in desktop browser. I also deployed from local folder. I deployed from AWS server. All worked fine in Windows 10. But on my Android, with Night Mode set, the chrome builtin browser does not change the background to black. I assume if I start from home screen icon and as android app, it won’t either. However, my iPad Pro as web app in chrome does work just fine.

Here’s the reason. The night mode in the settings in the notification pull down does change the dark mode setting for some google apps. To get the dark mode turned on for chrome on android, the setting is in chrome menu, settings, themes, dark. Works great as well. Odd that android chrome is different. There is no mention of dark mode in chrome for windows in settings/themes.

Thanks @GaryGorsline , the blog post has been updated.

UPDATE Android 10 :arrow_right: Two Dark Mode Changes:

With the release of Android 10, I noticed two changes in the way Dark Mode is handled:

  1. In Chrome under settings and then themes, there is now a third choice: System Default - this setting tells Chrome to use the device Dark Mode setting as Chrome’s Dark Mode setting. Prior to this, you could only set a light or dark mode for Chrome and the device settings were ignored.

  2. In Android settings, under display, the dark mode setting has changed from on and off to a series of questions: You can turn dark mode on or off, as before, but now you can set whether the device automatically turns dark mode on and off. You have two possibilities on when the device will change to dark or light mode. One is at sunrise and sunset. The second option allows the user to set the time of day when dark mode is set, and when light mode is reestablished. It’s a disappointment that there is no option to use the luminosity sensor to determine if the device is in a light or dark environment.