From 98cf876ea016e0fcf633ba3db7af6763783e354e Mon Sep 17 00:00:00 2001 From: engigu Date: Fri, 17 Apr 2026 21:09:12 +0800 Subject: [PATCH] chore: mobile font --- web/src/assets/index.css | 13 ++++++------- web/src/components/ThemeToggle.vue | 2 +- web/src/layouts/MainLayout.vue | 12 ++++++++---- web/src/views/dashboard/Dashboard.vue | 4 ++-- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/web/src/assets/index.css b/web/src/assets/index.css index a24ba9f..a60a6b1 100644 --- a/web/src/assets/index.css +++ b/web/src/assets/index.css @@ -242,10 +242,9 @@ @media (max-width: 639px) { body { font-size: 15.5px; - font-weight: 500; line-height: 1.55; letter-spacing: -0.01em; - /* 移动端使用 antialiased 以匹配高 DPI 渲染,开启字重补偿 */ + /* 移动端使用 antialiased 以匹配高 DPI 渲染 */ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } @@ -257,28 +256,28 @@ line-height: 1.3; } - /* 正文与描述类文字同步加厚,使用标准字重 500 以匹配静态字体 */ + /* 正文与描述类文字回归 400,依靠 15.5px 的字号保证清晰度 */ p, span:not([class*="icon"]), label, [class*="description"], [class*="muted"], .text-muted-foreground { - font-weight: 500; + font-weight: 400; line-height: 1.6; } - /* 针对移动端小字进行字重补偿,使用标准字重 600 */ + /* 针对移动端小字保持适度加重 */ .text-xs { font-size: 12.5px; - font-weight: 600; + font-weight: 500; line-height: 1.4; letter-spacing: 0.01em; } .text-sm { font-size: 14.5px; - font-weight: 500; + font-weight: 400; line-height: 1.5; } diff --git a/web/src/components/ThemeToggle.vue b/web/src/components/ThemeToggle.vue index b3d7c9c..2a86c9b 100644 --- a/web/src/components/ThemeToggle.vue +++ b/web/src/components/ThemeToggle.vue @@ -32,7 +32,7 @@ const { theme, setTheme } = useTheme() - 跟随系统 + 系统 diff --git a/web/src/layouts/MainLayout.vue b/web/src/layouts/MainLayout.vue index d7ee333..8d8611e 100644 --- a/web/src/layouts/MainLayout.vue +++ b/web/src/layouts/MainLayout.vue @@ -134,7 +134,12 @@ onMounted(() => {