- 新增 GET /api/fonts 列出二进制同级 font/ 目录里的字体文件,/fonts/<文件名> 对外提供(只认一级文件名,拒绝穿越) - 站点设置新增 font.url / font.family,校验只接受 http(s):// 或 /fonts/ 开头的链接 - 前台按设置注入 @font-face 或 CSS 链接并覆盖 --su-font-sans;留空回到内置文楷 - 后台「系统管理」新增字体选择 + 链接 + 族名;撤销/保存按钮覆盖该页 - 撤掉上一轮的霞鹜新晰黑改动
62 lines
1.2 KiB
CSS
62 lines
1.2 KiB
CSS
/* 页面级基础:字号 / 字体 / 重置。颜色与间距全部来自 @stash/ui 的令牌。 */
|
||
|
||
:root {
|
||
font-family: var(--su-font-sans);
|
||
font-size: var(--su-font-size-md);
|
||
line-height: var(--su-line-height-md);
|
||
color: var(--su-text-main);
|
||
background-color: var(--su-bg-page);
|
||
color-scheme: light;
|
||
-webkit-font-smoothing: antialiased;
|
||
-moz-osx-font-smoothing: grayscale;
|
||
}
|
||
|
||
html[data-scheme='dark'] {
|
||
color-scheme: dark;
|
||
}
|
||
|
||
* {
|
||
box-sizing: border-box;
|
||
margin: 0;
|
||
padding: 0;
|
||
}
|
||
|
||
html,
|
||
body,
|
||
#root {
|
||
min-height: 100%;
|
||
}
|
||
|
||
a {
|
||
color: inherit;
|
||
text-decoration: none;
|
||
}
|
||
|
||
button {
|
||
font: inherit;
|
||
color: inherit;
|
||
border: none;
|
||
background: none;
|
||
}
|
||
|
||
ul,
|
||
ol {
|
||
list-style: none;
|
||
}
|
||
|
||
/* 键盘焦点环由组件库统一提供;这里只给「非表单控件」补兜底。
|
||
表单控件不能加全局 outline:输入框点击时也会命中 :focus-visible,
|
||
会和组件自己的边框态叠成「双框」(用户实际报过的 bug)。 */
|
||
a:focus-visible,
|
||
button:focus-visible,
|
||
[tabindex]:not(input):focus-visible {
|
||
outline: var(--su-focus-ring);
|
||
outline-offset: var(--su-focus-ring-offset);
|
||
}
|
||
|
||
input:focus-visible,
|
||
textarea:focus-visible,
|
||
select:focus-visible {
|
||
outline: none;
|
||
}
|