Background turned dark, but it didn't work for the texts
See original GitHub issueHi, thanks for your work!
I used Darkmode.js to add dark mode for my blog powered by VuePress. But in the dark mode, only the background turned black, while the text didn’t change at all, like the screenshot below, which looked very weird. In the meanwhile, the button didn’t appear the emoji 🌓 I added.
And I used the script as your instruction shows:
- Using NPM
npm install darkmode-js
- Add the javascript code and options:
// Dark Mode
import Darkmode from 'darkmode-js';
new Darkmode().showWidget();
var options = {
label: '🌓'
}
const darkmode = new Darkmode(options);
darkmode.showWidget();
It would be great if you can help me about the problem. Thanks in advance 😊
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Dark Mode New Problems -- selected text background color ...
If you want the white page permanently, go to File > Options > General and check the box for "Disable dark mode". https://jay-freedman.info....
Read more >Somehow the dark theme has been turned on (black ...
Go to Settings.. battery and darken interface colours.. Settings, battery, and battery saver click on battery saver screen turns back white. My phone...
Read more >Background changed to black using iOS 14.3 on iPhone 11
The background is black when I use apps like Message and email. It was white and I'm not sure why is changed to...
Read more >Android - Dark mode issue: black text on dark background
Go to your activity_main.xml and set the textColor attributes of the TextViews whose colors remain black to
Read more >How To Fix Outlook Dark Mode Problems (Email Design)
In this tutorial I'll explain how to stop the text in your HTML emails from changing color in Dark Mode in Outlook for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@madhavarshney Thank you for the fix. It is elegant. Within the same stacking context, any subsequent positioned element with a positive or an unspecified z-index will be inevitably stacked over the dark mode layer and cause problems. The dark mode layer really should have been given a positive z-index so that it is always at the top.
I will look into it to put it also in the library if it fits (and with the dynamic variables)