Files
2026-08-11 18:42:11 +08:00

112 lines
2.8 KiB
CSS
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* 全局基础样式 */
html {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* UnoCSS wind3 preflight 未含 Tailwind 标准的 border 重置:浏览器默认 border-style 为 none
导致 border-b / border 等宽度工具类不可见,此处补上(宽度默认 0,不影响未显式设置边框的元素) */
*,
::before,
::after {
box-sizing: border-box;
border-width: 0;
border-style: solid;
border-color: currentColor;
}
body {
margin: 0;
/* 正文/UI:英文走 Inter,中文走 Noto Sans SC(已按 unicode-range 拆分按需下载),
未加载完成时回退系统字体(macOS PingFang / Windows 微软雅黑),font-display: swap 不阻塞渲染 */
font-family:
'Inter',
'Noto Sans SC',
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
'Helvetica Neue',
Arial,
'PingFang SC',
'Hiragino Sans GB',
'Microsoft YaHei',
sans-serif;
}
/* 品牌大标题字体:英文走 Space Grotesk,中文走 Noto Sans SC(标题元素 font-weight 多为 700
复用正文已加载的 700 字重 CJK 子集,零额外体积)。富文本内标题由 .rich-text 规则还原为正文字体,保证可读性。 */
h1,
section h2 {
font-family: 'Space Grotesk', 'Noto Sans SC', sans-serif;
}
/* 链接统一下划线重置,避免浏览器默认样式 */
a {
text-decoration: none;
}
/* 区块标题字号统一由此处控制:config.title_font_size 经 SectionRenderer 注入 --sec-title-fs(桌面)
/ --sec-title-fs-m(移动端),留空兜底桌面 36px / 移动端 22.5px62.5%);
富文本内的 h2 由 .rich-text 标题规则覆盖(class 选择器优先级更高) */
section h2 {
font-size: var(--sec-title-fs-m, 22.5px);
}
@media (min-width: 768px) {
section h2 {
font-size: var(--sec-title-fs, 36px);
}
}
/* 富文本(wangEditor 输出 HTML)样式还原:UnoCSS preflight 重置了 p/列表/标题等默认样式 */
.rich-text p {
margin: 0 0 0.75em;
}
.rich-text > p:last-child {
margin-bottom: 0;
}
.rich-text ul,
.rich-text ol {
margin: 0 0 0.75em;
padding-left: 1.5em;
}
.rich-text ul {
list-style: disc;
}
.rich-text ol {
list-style: decimal;
}
.rich-text h1,
.rich-text h2,
.rich-text h3,
.rich-text h4,
.rich-text h5 {
margin: 0.6em 0;
font-weight: 700;
line-height: 1.3;
/* 还原为正文字体,覆盖 h1/section h2 的标题字体(选择器优先级更高) */
font-family: 'Inter', 'Noto Sans SC', sans-serif;
}
.rich-text h1 {
font-size: 1.6em;
}
.rich-text h2 {
font-size: 1.4em;
}
.rich-text h3 {
font-size: 1.2em;
}
.rich-text h4,
.rich-text h5 {
font-size: 1.05em;
}
.rich-text blockquote {
margin: 0 0 0.75em;
padding-left: 12px;
border-left: 3px solid currentColor;
opacity: 0.8;
}
.rich-text a {
text-decoration: underline;
}