css: mix with background color for horizontal rule, closes #1649 (#1759)

This commit is contained in:
Huang Xin
2025-08-07 17:18:56 +08:00
committed by GitHub
parent ceb1963b88
commit f2f744a2fe
+8 -1
View File
@@ -120,7 +120,7 @@ const getColorStyles = (
background-color: var(--theme-bg-color, transparent);
background: var(--background-set, none);
}
div, p, font, h1, h2, h3, h4, h5, h6 {
section, div, p, font, h1, h2, h3, h4, h5, h6 {
${overrideColor ? `background-color: ${bg} !important;` : ''}
${overrideColor ? `color: ${fg} !important;` : ''}
}
@@ -141,6 +141,13 @@ const getColorStyles = (
${isDarkMode && invertImgColorInDark ? 'filter: invert(100%);' : ''}
${!isDarkMode && overrideColor ? 'mix-blend-mode: multiply;' : ''}
}
/* horizontal rule */
*:has(hr) {
background-color: ${bg};
}
hr {
mix-blend-mode: multiply;
}
/* inline images */
p img, span img, sup img {
mix-blend-mode: ${isDarkMode ? 'screen' : 'multiply'};