chore : update font style
This commit is contained in:
@@ -7,6 +7,12 @@ onMounted(() => {
|
||||
// 全局应用设备差异化垂直抗锯齿
|
||||
const isMac = /Mac|iPod|iPhone|iPad/.test(navigator.userAgent)
|
||||
document.documentElement.classList.add(isMac ? 'antialiased' : 'subpixel-antialiased')
|
||||
|
||||
// Windows 平台检测,用于在 CSS 中调整字体优先级
|
||||
const isWindows = /Win/.test(navigator.userAgent)
|
||||
if (isWindows) {
|
||||
document.documentElement.classList.add('is-windows')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -100,6 +100,13 @@
|
||||
--sidebar-accent-foreground: #333333;
|
||||
--sidebar-border: #e5e7eb;
|
||||
--sidebar-ring: #9ca3af;
|
||||
|
||||
/* 字体栈定义 */
|
||||
--font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans CN", sans-serif;
|
||||
}
|
||||
|
||||
.is-windows {
|
||||
--font-main: 'Inter', 'Noto Sans SC', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans CN", sans-serif;
|
||||
}
|
||||
|
||||
/* OKLCH support targeting modern browsers */
|
||||
@@ -216,8 +223,8 @@
|
||||
|
||||
body {
|
||||
@apply bg-background text-foreground antialiased;
|
||||
/* 增强字体栈:优先 Inter,同时补充 Noto Sans SC 以及安卓/Linux 中文字体 */
|
||||
font-family: 'Inter', 'Noto Sans SC', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans CN", sans-serif;
|
||||
/* 增强字体栈:根据平台差异化 Noto Sans SC 与 system-ui 的优先级 */
|
||||
font-family: var(--font-main);
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
letter-spacing: -0.01em;
|
||||
@@ -227,7 +234,7 @@
|
||||
}
|
||||
|
||||
input, textarea, button, select {
|
||||
font-family: 'Inter', 'Noto Sans SC', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans CN", sans-serif !important;
|
||||
font-family: var(--font-main) !important;
|
||||
}
|
||||
|
||||
.font-code,
|
||||
|
||||
Reference in New Issue
Block a user