UserCSS example
/* ==UserStyle==
@name Inter加思源黑體
@description UserCSS example
@namespace https://github.com/abc0922001
@author abc0922001
@version 0.1.0
@license MIT
==/UserStyle== */
@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Noto+Sans+HK:[email protected]&family=Noto+Sans+JP:[email protected]&family=Noto+Sans+KR:[email protected]&family=Noto+Sans+Mono:[email protected]&family=Noto+Sans+TC:[email protected]&display=swap");
/* 根據語系切換 Sans 主字體 */
[lang="zh-CN" i],
[lang="zh" i],
[lang="zh-hans" i] {
--noto-sans: "Noto Sans SC";
}
[lang="ko" i] {
--noto-sans: "Noto Sans KR";
}
[lang="ja" i],
[lang="jp" i] {
--noto-sans: "Noto Sans JP";
}
[lang="zh-HK" i] {
--noto-sans: "Noto Sans HK";
}
[lang="zh-TW" i],
[lang="zh-hant" i] {
--noto-sans: "Noto Sans TC";
}
/* 預設語言:繁體中文 */
html {
--noto-sans: "Noto Sans TC";
--noto-mono: "Noto Sans Mono";
}
/* 一般文字,支援字重變化 */
:not([class*="icon"]):not(i) {
font-family: 'Inter', var(--noto-sans), "Google Symbols", "FontAwesome", "Material Icons Extended", "Material-Design-Icons", "QualcommIcon", "VideoJS", "icons101", "AmebaNewSymbols", "videofont", "ohpOffice365Icons", "anchorjs-icons", "consumer-icons", "tm-detail-font", "iconfont", "FabricMDL2Icons", "MWF-MDL2", "Noto Emoji", sans-serif !important;
}
/* 程式碼區塊使用等寬字體(Noto Sans Mono) */
pre,
code {
font-family: var(--noto-mono), Consolas, "Courier New", monospace !important;
}