Change theme class name to complex on web pages

This commit is contained in:
sienori 2022-08-30 22:21:12 +09:00
parent 33d18e4226
commit 46f291275b
2 changed files with 5 additions and 5 deletions

View file

@ -216,7 +216,7 @@ const showTranslateContainer = (
if (element) return;
if (!isEnabled) return;
const themeClass = getSettings("theme") + "-theme";
const themeClass = "simple-translate-" + getSettings("theme") + "-theme";
document.body.insertAdjacentHTML("beforeend", `<div id="simple-translate" class="${themeClass}"></div>`);
ReactDOM.render(

View file

@ -10,20 +10,20 @@
--simple-translate-highlight: #5595ff;
}
.light-theme {
.simple-translate-light-theme {
--simple-translate-main-text: #0c0c0d;
--simple-translate-sub-text: #737373;
--simple-translate-main-bg: #ffffff;
}
.dark-theme {
.simple-translate-dark-theme {
--simple-translate-main-text: #e6e6e6;
--simple-translate-sub-text: #aaaaaa;
--simple-translate-main-bg: #181818;
}
// copy of .light-theme
.system-theme {
.simple-translate-system-theme {
--simple-translate-main-text: #000000;
--simple-translate-sub-text: #737373;
--simple-translate-main-bg: #ffffff;
@ -31,7 +31,7 @@
@media (prefers-color-scheme: dark) {
// copy of .dark-theme
.system-theme {
.simple-translate-system-theme {
--simple-translate-main-text: #e6e6e6;
--simple-translate-sub-text: #aaaaaa;
--simple-translate-main-bg: #181818;