fix: don't override bg color for img, closes #656 (#711)

This commit is contained in:
Huang Xin
2025-03-26 19:23:46 +08:00
committed by GitHub
parent 490fe7e70c
commit 39ac89fead
+3 -3
View File
@@ -145,7 +145,7 @@ const getLayoutStyles = (
color: ${fg};
}
a:any-link {
color: ${primary} ${bg === '#ffffff' ? '' : '!important'};
color: ${primary} ${isDarkMode ? '!important' : ''};
}
aside[epub|type~="footnote"] {
display: none;
@@ -189,8 +189,8 @@ const getLayoutStyles = (
background-color: var(--theme-bg-color, transparent);
background: var(--background-set, none);
}
body *:not(a):not(#b1):not(#b1 *):not(#b2):not(#b2 *):not(.bg):not(.bg *):not(.vol):not(.vol *):not(.background):not(.background *) {
${bg === '#ffffff' ? '' : `background-color: ${bg} !important;`}
body *:not(a):not(#b1):not(#b1 *):not(#b2):not(#b2 *):not(img):not(.bg):not(.bg *):not(.vol):not(.vol *):not(.background):not(.background *) {
${isDarkMode ? `background-color: ${bg} !important;` : ''}
}
body {
overflow: unset;