Auto theme: do not load default-light.css file if dark mode is preferred (#2764)

The previous code was importing both files (`default-light.css` and  `default-dark.css`) when dark mode was set. 
Due to small differences between these themes, some elements were retaining Light styles on the Dark theme. 
Now only one file is imported.
This commit is contained in:
RD WebDesign
2023-10-19 14:41:52 -03:00
committed by GitHub
+3 -3
View File
@@ -1,6 +1,6 @@
/* Code courtesy of https://blog.jim-nielsen.com/2019/conditional-syntax-highlighting-in-dark-mode-with-css-imports/ */
/* Assume light mode by default */
@import "default-light.css" screen;
/* Supersede dark mode when applicable */
/* Import light mode if color-scheme is different than dark (even not set) */
@import "default-light.css" screen and not (prefers-color-scheme: dark);
/* Import dark mode when applicable */
@import "default-dark.css" screen and (prefers-color-scheme: dark);