Change theme class name to complex on web pages
This commit is contained in:
parent
33d18e4226
commit
46f291275b
|
@ -216,7 +216,7 @@ const showTranslateContainer = (
|
||||||
if (element) return;
|
if (element) return;
|
||||||
if (!isEnabled) 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>`);
|
document.body.insertAdjacentHTML("beforeend", `<div id="simple-translate" class="${themeClass}"></div>`);
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
|
|
|
@ -10,20 +10,20 @@
|
||||||
--simple-translate-highlight: #5595ff;
|
--simple-translate-highlight: #5595ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.light-theme {
|
.simple-translate-light-theme {
|
||||||
--simple-translate-main-text: #0c0c0d;
|
--simple-translate-main-text: #0c0c0d;
|
||||||
--simple-translate-sub-text: #737373;
|
--simple-translate-sub-text: #737373;
|
||||||
--simple-translate-main-bg: #ffffff;
|
--simple-translate-main-bg: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark-theme {
|
.simple-translate-dark-theme {
|
||||||
--simple-translate-main-text: #e6e6e6;
|
--simple-translate-main-text: #e6e6e6;
|
||||||
--simple-translate-sub-text: #aaaaaa;
|
--simple-translate-sub-text: #aaaaaa;
|
||||||
--simple-translate-main-bg: #181818;
|
--simple-translate-main-bg: #181818;
|
||||||
}
|
}
|
||||||
|
|
||||||
// copy of .light-theme
|
// copy of .light-theme
|
||||||
.system-theme {
|
.simple-translate-system-theme {
|
||||||
--simple-translate-main-text: #000000;
|
--simple-translate-main-text: #000000;
|
||||||
--simple-translate-sub-text: #737373;
|
--simple-translate-sub-text: #737373;
|
||||||
--simple-translate-main-bg: #ffffff;
|
--simple-translate-main-bg: #ffffff;
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
// copy of .dark-theme
|
// copy of .dark-theme
|
||||||
.system-theme {
|
.simple-translate-system-theme {
|
||||||
--simple-translate-main-text: #e6e6e6;
|
--simple-translate-main-text: #e6e6e6;
|
||||||
--simple-translate-sub-text: #aaaaaa;
|
--simple-translate-sub-text: #aaaaaa;
|
||||||
--simple-translate-main-bg: #181818;
|
--simple-translate-main-bg: #181818;
|
||||||
|
|
Loading…
Reference in a new issue