compat(css): only override img background when overriding book color, closes #3377 (#3379)

This commit is contained in:
Huang Xin
2026-02-25 18:43:02 +08:00
committed by GitHub
parent 3e7b57282e
commit 70eb59e2d6
+3 -3
View File
@@ -168,6 +168,9 @@ const getColorStyles = (
${isDarkMode && invertImgColorInDark ? 'filter: invert(100%);' : ''}
${!isDarkMode && overrideColor ? 'mix-blend-mode: multiply;' : ''}
}
svg, img {
${overrideColor ? `background-color: transparent !important;` : ''};
}
/* horizontal rule #1649 */
*:has(> hr.background-img):not(body) {
background-color: ${bg};
@@ -273,9 +276,6 @@ const getLayoutStyles = (
overflow: unset;
zoom: ${zoomLevel};
}
svg, img {
background-color: transparent !important;
}
svg:where(:not([width])), img:where(:not([width])) {
width: auto;
}