Rename sans-serif CSS class into sans-serif-fonts to match the JS setting, allowing to simplify JS code
This commit is contained in:
parent
5561167fbd
commit
bf49068b72
3 changed files with 2 additions and 10 deletions
|
|
@ -64,7 +64,7 @@ xmlns="http://www.w3.org/2000/svg" fill="black" height="18px">\
|
|||
<path d="M3,5h16M3,11h16M3,17h16" stroke-width="2.75"/></svg>');
|
||||
}
|
||||
|
||||
:root.sans-serif {
|
||||
:root.sans-serif-fonts {
|
||||
--font-family: "Fira Sans", sans-serif;
|
||||
--font-family-code: "Fira Mono", monospace;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,12 +44,6 @@
|
|||
}
|
||||
break;
|
||||
case "sans-serif-fonts":
|
||||
if (value === true) {
|
||||
addClass(document.documentElement, "sans-serif");
|
||||
} else {
|
||||
removeClass(document.documentElement, "sans-serif");
|
||||
}
|
||||
break;
|
||||
case "hide-sidebar":
|
||||
case "hide-toc":
|
||||
case "hide-modnav":
|
||||
|
|
|
|||
|
|
@ -319,9 +319,6 @@ updateTheme();
|
|||
if (getSettingValue("source-sidebar-show") === "true") {
|
||||
addClass(document.documentElement, "src-sidebar-expanded");
|
||||
}
|
||||
if (getSettingValue("sans-serif-fonts") === "true") {
|
||||
addClass(document.documentElement, "sans-serif");
|
||||
}
|
||||
(function() {
|
||||
const settings = [
|
||||
"hide-sidebar",
|
||||
|
|
@ -329,6 +326,7 @@ if (getSettingValue("sans-serif-fonts") === "true") {
|
|||
"hide-modnav",
|
||||
"word-wrap-source-code",
|
||||
"hide-deprecated-items",
|
||||
"sans-serif-fonts",
|
||||
];
|
||||
for (const setting of settings) {
|
||||
if (getSettingValue(setting) === "true") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue