diff --git a/css/dialogs.css b/css/dialogs.css index 334b8bf4..e0bdf64a 100644 --- a/css/dialogs.css +++ b/css/dialogs.css @@ -804,6 +804,7 @@ background-color: var(--color-frame); border: 2px solid var(--color-frame); border-top: none; + overflow: hidden; } .custom_thumbnail_preview { position: relative; diff --git a/js/interface/themes.js b/js/interface/themes.js index f2635be9..6b8b5b84 100644 --- a/js/interface/themes.js +++ b/js/interface/themes.js @@ -442,15 +442,21 @@ const CustomTheme = { style.textContent = theme.thumbnail; const sheet = style.sheet; for (const rule of sheet.cssRules) { - thumbnailStyles += `.custom_theme_thumbnail_${theme.id} ${rule.selectorText} { ${rule.style.cssText} }\n`; - } + const selectors = rule.selectorText.split(/(? e.trim()) + for (const selector of selectors) { + thumbnailStyles += `.custom_theme_thumbnail_${theme.id} ${selector} { ${rule.style.cssText} }\n`; + } + } } if (CustomTheme.data.customized) { style.textContent = CustomTheme.data.thumbnail; const sheet = style.sheet; for (const rule of sheet.cssRules) { - thumbnailStyles += `.custom_theme_thumbnail_${CustomTheme.data.id} ${rule.selectorText} { ${rule.style.cssText} }\n`; - } + const selectors = rule.selectorText.split(/(? e.trim()) + for (const selector of selectors) { + thumbnailStyles += `.custom_theme_thumbnail_${CustomTheme.data.id} ${selector} { ${rule.style.cssText} }\n`; + } + } } document.head.removeChild(style); $('style#theme_thumbnail_css').text(thumbnailStyles);