style(typography): 正文字体换成霞鹜新晰黑

- index.html 换用 cn-fontsource 的霞鹜新晰黑 webfont(unicode-range 分片)
- index.css 覆盖 --su-font-sans,组件库默认保持文楷
- ALRIGHT-DESIGN 字体表同步
This commit is contained in:
2026-11-05 16:58:57 +08:00
parent 21825431c7
commit e243a20b69
3 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -88,7 +88,7 @@
| 角色 | 字体 | 说明 | | 角色 | 字体 | 说明 |
| --- | --- | --- | | --- | --- | --- |
| 正文 | **LXGW WenKai(霞鹜文楷)** | 与演示站同一份 webfont,`cdn.staticfile.net` | | 正文 | **LXGW Neo XiHei(霞鹜新晰黑)** | 应用当前使用;`cdn.jsdelivr.net/npm/cn-fontsource-lxgw-neo-xi-hei-regular` 按 unicode-range 分片加载,在 `stash-web/src/index.css` 覆盖 `--su-font-sans`(组件库自身默认仍是文楷) |
| 回退 | `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif` | 字体加载失败时 | | 回退 | `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif` | 字体加载失败时 |
| 数字(主题) | `Outfit-Medium` | 仅主题的 `font-price` / `font-number` 使用,Stash 未引入 | | 数字(主题) | `Outfit-Medium` | 仅主题的 `font-price` / `font-number` 使用,Stash 未引入 |
| 等宽 | `ui-monospace, Consolas, monospace` | 路由地址等路径文本 | | 等宽 | `ui-monospace, Consolas, monospace` | 路由地址等路径文本 |
+2 -2
View File
@@ -13,10 +13,10 @@
document.documentElement.dataset.scheme = dark ? 'dark' : 'light' document.documentElement.dataset.scheme = dark ? 'dark' : 'light'
} catch (e) {} } catch (e) {}
</script> </script>
<!-- 与 Alright 主题一致的正文字体:霞鹜文楷 --> <!-- 正文字体:霞鹜新晰黑(cn-fontsource 按 unicode-range 分片,按需加载) -->
<link <link
rel="stylesheet" rel="stylesheet"
href="https://cdn.staticfile.net/lxgw-wenkai-webfont/1.7.0/style.min.css" href="https://cdn.jsdelivr.net/npm/cn-fontsource-lxgw-neo-xi-hei-regular/font.css"
crossorigin="anonymous" crossorigin="anonymous"
/> />
<title>Stash</title> <title>Stash</title>
+4
View File
@@ -1,6 +1,10 @@
/* 页面级基础:字号 / 字体 / 重置。颜色与间距全部来自 @stash/ui 的令牌。 */ /* 页面级基础:字号 / 字体 / 重置。颜色与间距全部来自 @stash/ui 的令牌。 */
:root { :root {
/* 正文字体:霞鹜新晰黑。@stash/ui 默认是霞鹜文楷,这里在应用层换掉,不影响组件库本身 */
--su-font-sans:
'LXGW Neo XiHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
'Hiragino Sans GB', 'Microsoft YaHei', 'Source Han Sans CN', sans-serif;
font-family: var(--su-font-sans); font-family: var(--su-font-sans);
font-size: var(--su-font-size-md); font-size: var(--su-font-size-md);
line-height: var(--su-line-height-md); line-height: var(--su-line-height-md);