mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 12:13:48 +01:00
fix: 💄 different default font if cjk
This commit is contained in:
parent
293880f716
commit
2044196a23
@ -102,7 +102,11 @@
|
||||
localStorage.setItem("fontSize", null);
|
||||
fontSize = localStorage.getItem("fontSize");
|
||||
}
|
||||
document.documentElement.style.fontSize = fontSize + "px";
|
||||
document.documentElement.style.fontSize = `${fontSize}px`;
|
||||
}
|
||||
|
||||
if (["ja-JP", "ja-KS", "ko-KR", "zh-CN", "zh-TW"].includes(lang)) {
|
||||
document.documentElement.classList.add("useCJKFont");
|
||||
}
|
||||
|
||||
const useSystemFont = localStorage.getItem("useSystemFont");
|
||||
@ -123,7 +127,7 @@
|
||||
}
|
||||
|
||||
async function addStyle(styleText) {
|
||||
let css = document.createElement("style");
|
||||
const css = document.createElement("style");
|
||||
css.appendChild(document.createTextNode(styleText));
|
||||
document.head.appendChild(css);
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ html {
|
||||
accent-color: var(--accent);
|
||||
overflow: auto;
|
||||
overflow-wrap: break-word;
|
||||
font-family: "BIZ UDGothic", Roboto, HelveticaNeue, Arial, sans-serif;
|
||||
font-family: Roboto, HelveticaNeue, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
text-size-adjust: 100%;
|
||||
@ -47,6 +47,10 @@ html {
|
||||
scroll-padding: 60px;
|
||||
overflow-x: clip;
|
||||
|
||||
&.useCJKFont {
|
||||
font-family: "Hiragino Maru Gothic Pro", "BIZ UDGothic", Roboto, HelveticaNeue, Arial, sans-serif;
|
||||
}
|
||||
|
||||
&.useSystemFont {
|
||||
font-family:
|
||||
system-ui,
|
||||
|
Loading…
Reference in New Issue
Block a user