From f2f744a2fe7973766e76fe3323fd7d3e5c3bb6b8 Mon Sep 17 00:00:00 2001 From: Huang Xin Date: Thu, 7 Aug 2025 17:18:56 +0800 Subject: [PATCH] css: mix with background color for horizontal rule, closes #1649 (#1759) --- apps/readest-app/src/utils/style.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/readest-app/src/utils/style.ts b/apps/readest-app/src/utils/style.ts index 0333a1af..5babadbf 100644 --- a/apps/readest-app/src/utils/style.ts +++ b/apps/readest-app/src/utils/style.ts @@ -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'};