mirror of
https://github.com/YuleBest/LuminPro.git
synced 2026-12-04 00:54:42 +08:00
fix(webui): MWC 组件内字体改用 Geist;折叠区收起时不再多留间距
- 设置 --md-ref-typeface-plain/brand:@material/web 组件内部字体默认回退 Roboto, 输入框及其 supporting-text 因此与页面字体不一致 - .collapse 收起时抵消父容器 gap(并参与过渡),二级设置卡片折叠态下方不再留大段空白
This commit is contained in:
1 parent
70fe9ea025
commit
7200793d17
2 files changed
+17
-2
No files matched your search
@@ -70,8 +70,11 @@
|
|||||||
.collapse {
|
.collapse {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-rows: 0fr;
|
grid-template-rows: 0fr;
|
||||||
transition: grid-template-rows var(--md-sys-motion-duration-medium2)
|
margin-top: 0;
|
||||||
var(--md-sys-motion-easing-emphasized);
|
transition:
|
||||||
|
grid-template-rows var(--md-sys-motion-duration-medium2)
|
||||||
|
var(--md-sys-motion-easing-emphasized),
|
||||||
|
margin-top var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized);
|
||||||
}
|
}
|
||||||
|
|
||||||
.collapse.open {
|
.collapse.open {
|
||||||
@@ -92,6 +95,11 @@
|
|||||||
padding-bottom: var(--collapse-gap, 0px);
|
padding-bottom: var(--collapse-gap, 0px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 收起时高度为 0 但仍参与父容器 gap,会多留一段空白;抵消其中一次间距 */
|
||||||
|
.collapse:not(.open) {
|
||||||
|
margin-top: calc(-1 * var(--md-sys-spacing-3));
|
||||||
|
}
|
||||||
|
|
||||||
.collapse--gap {
|
.collapse--gap {
|
||||||
--collapse-gap: var(--md-sys-spacing-3);
|
--collapse-gap: var(--md-sys-spacing-3);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,6 +68,13 @@
|
|||||||
--md-sys-typescale-font: 'Geist', system-ui, -apple-system, sans-serif;
|
--md-sys-typescale-font: 'Geist', system-ui, -apple-system, sans-serif;
|
||||||
--md-sys-typescale-font-mono: 'Geist Mono', ui-monospace, monospace;
|
--md-sys-typescale-font-mono: 'Geist Mono', ui-monospace, monospace;
|
||||||
|
|
||||||
|
/* @material/web 组件内部的字体族取自 ref typeface(默认回退 Roboto),
|
||||||
|
必须显式指向项目字体,否则组件内文字与页面字体不一致 */
|
||||||
|
--md-ref-typeface-brand: 'Geist', system-ui, -apple-system, sans-serif;
|
||||||
|
--md-ref-typeface-plain: 'Geist', system-ui, -apple-system, sans-serif;
|
||||||
|
--md-ref-typeface-weight-regular: 400;
|
||||||
|
--md-ref-typeface-weight-medium: 500;
|
||||||
|
|
||||||
/* ── 形状 shape ─────────────────────────────────────────────────── */
|
/* ── 形状 shape ─────────────────────────────────────────────────── */
|
||||||
--md-sys-shape-corner-none: 0;
|
--md-sys-shape-corner-none: 0;
|
||||||
--md-sys-shape-corner-extra-small: 4px;
|
--md-sys-shape-corner-extra-small: 4px;
|
||||||
|
|||||||
Reference in new issue
Block a user