forked from akai/readest
fix(css): only override background color of hr when it has background image (#2808)
This commit is contained in:
@@ -155,7 +155,7 @@ const getColorStyles = (
|
||||
${!isDarkMode && overrideColor ? 'mix-blend-mode: multiply;' : ''}
|
||||
}
|
||||
/* horizontal rule #1649 */
|
||||
*:has(> hr[class]):not(body) {
|
||||
*:has(> hr.background-img):not(body) {
|
||||
background-color: ${bg};
|
||||
}
|
||||
hr {
|
||||
@@ -759,6 +759,12 @@ export const applyImageStyle = (document: Document) => {
|
||||
img.classList.add('has-text-siblings');
|
||||
}
|
||||
});
|
||||
document.querySelectorAll('hr').forEach((hr) => {
|
||||
const computedStyle = window.getComputedStyle(hr);
|
||||
if (computedStyle.backgroundImage && computedStyle.backgroundImage !== 'none') {
|
||||
hr.classList.add('background-img');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
export const applyTableStyle = (document: Document) => {
|
||||
|
||||
Reference in New Issue
Block a user