For a while, dark mode on my site wasn’t working that well. Turns out that WordPress was, for some reason, using !important on one of the background color rules. I was able to fix it with some CSS:
html.wp-dark-mode-active {
background-color: #303231 !important;
}
![](https://shreyasm.dev/wp-content/uploads/2023/10/Screenshot-2023-10-15-at-11-03-49-Blog-Shreyas-M.png)
![](https://shreyasm.dev/wp-content/uploads/2023/10/Screenshot-2023-10-15-at-11-04-39-Blog-Shreyas-M.png)
Leave a Reply