@xihan-ui/styles 2.1.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1227 -0
- package/README.md +6 -1
- package/component-tokens.d.ts +505 -96
- package/components.tokens.json +34636 -25846
- package/css/accordion.css +34 -8
- package/css/alert.css +59 -1
- package/css/anchor.css +46 -8
- package/css/approval.css +116 -76
- package/css/avatar-group.css +1 -1
- package/css/avatar.css +13 -5
- package/css/back-top.css +61 -42
- package/css/badge.css +62 -12
- package/css/bar-code.css +1 -1
- package/css/breadcrumb.css +62 -3
- package/css/button-group.css +4 -4
- package/css/button.css +67 -19
- package/css/calendar-picker.css +19 -0
- package/css/calendar-range-picker.css +39 -2
- package/css/card.css +115 -1
- package/css/carousel.css +148 -43
- package/css/cartesian-chart.css +830 -0
- package/css/cascader.css +181 -65
- package/css/checkbox-group.css +59 -89
- package/css/checkbox.css +16 -49
- package/css/citation.css +470 -0
- package/css/clipboard.css +20 -63
- package/css/code-view.css +101 -6
- package/css/collapsible.css +34 -8
- package/css/color-field.css +18 -0
- package/css/color-picker.css +55 -58
- package/css/color-slider.css +22 -15
- package/css/color-swatch-picker.css +3 -1
- package/css/combobox.css +80 -33
- package/css/command.css +45 -43
- package/css/context-menu.css +39 -22
- package/css/date-field.css +23 -0
- package/css/date-picker.css +57 -22
- package/css/date-range-picker.css +301 -12
- package/css/description.css +17 -1
- package/css/descriptions.css +42 -0
- package/css/dialog.css +94 -36
- package/css/diff-view.css +97 -12
- package/css/download-trigger.css +44 -78
- package/css/drawer.css +160 -119
- package/css/editable.css +19 -0
- package/css/empty-state.css +7 -6
- package/css/field-array.css +36 -0
- package/css/field.css +16 -18
- package/css/file-upload.css +125 -135
- package/css/flex.css +324 -8
- package/css/float-button.css +165 -38
- package/css/floating-panel.css +53 -19
- package/css/form.css +23 -17
- package/css/funnel-chart.css +106 -0
- package/css/graph-chart.css +205 -0
- package/css/grid-list.css +235 -0
- package/css/grid.css +252 -1
- package/css/heatmap.css +119 -36
- package/css/hierarchy-chart.css +298 -0
- package/css/hover-card.css +31 -14
- package/css/icon.css +100 -0
- package/css/image-cropper.css +33 -7
- package/css/image-viewer.css +167 -22
- package/css/image.css +23 -4
- package/css/input-group.css +11 -13
- package/css/json-viewer.css +50 -2
- package/css/layout.css +68 -18
- package/css/liquid.css +106 -0
- package/css/list.css +1 -1
- package/css/listbox.css +46 -6
- package/css/loading-bar.css +27 -13
- package/css/log.css +129 -33
- package/css/markdown-stream.css +1 -1
- package/css/marquee.css +163 -7
- package/css/matrix-code.css +1 -1
- package/css/mention.css +35 -19
- package/css/menu.css +35 -21
- package/css/menubar.css +36 -20
- package/css/message-feed.css +172 -51
- package/css/navigation-menu.css +172 -11
- package/css/notification.css +429 -108
- package/css/number-field.css +22 -0
- package/css/page-header.css +3 -1
- package/css/pagination.css +126 -24
- package/css/password-input.css +40 -8
- package/css/pie-chart.css +247 -0
- package/css/popconfirm.css +44 -50
- package/css/popover.css +50 -14
- package/css/progress.css +308 -10
- package/css/prompt-input.css +36 -0
- package/css/question-flow.css +97 -57
- package/css/radar-chart.css +233 -0
- package/css/radio-group.css +363 -5
- package/css/rating.css +21 -23
- package/css/reasoning.css +61 -54
- package/css/resizable.css +6 -1
- package/css/sankey-chart.css +174 -0
- package/css/scroll-area.css +32 -0
- package/css/scrollbar.css +1 -1
- package/css/select.css +74 -55
- package/css/side-nav.css +173 -24
- package/css/signature-pad.css +16 -1
- package/css/skeleton.css +13 -14
- package/css/slider.css +35 -13
- package/css/sortable.css +37 -7
- package/css/sparkline.css +164 -0
- package/css/spinner.css +50 -22
- package/css/splitter.css +7 -1
- package/css/statistic.css +10 -0
- package/css/steps.css +248 -29
- package/css/switch.css +23 -48
- package/css/table.css +158 -118
- package/css/tabs.css +231 -19
- package/css/tag-group.css +27 -3
- package/css/tag.css +53 -12
- package/css/tags-input.css +40 -3
- package/css/text-field.css +19 -0
- package/css/time-field.css +20 -1
- package/css/time-picker.css +44 -15
- package/css/time-range-picker.css +45 -16
- package/css/timeline.css +1 -1
- package/css/toggle-group.css +4 -4
- package/css/toggle.css +4 -3
- package/css/tool-call.css +59 -51
- package/css/toolbar.css +101 -3
- package/css/tooltip.css +15 -2
- package/css/tour.css +42 -12
- package/css/transfer.css +98 -75
- package/css/tree-select.css +232 -53
- package/css/tree.css +201 -55
- package/css/truncate.css +55 -12
- package/css/typography.css +93 -0
- package/css/virtualizer.css +56 -0
- package/css/watermark.css +23 -0
- package/family/action-control.css +14 -5
- package/family/chart.css +480 -0
- package/family/check-mark.css +94 -0
- package/family/choice-card.css +97 -0
- package/family/collection-item.css +9 -15
- package/family/field-chrome.css +1 -12
- package/family/loading-ring.css +95 -0
- package/family/material.css +72 -0
- package/family/menu-choice.css +56 -0
- package/family/motion.css +207 -10
- package/family/tag-list.css +59 -0
- package/index.css +22997 -13678
- package/index.unlayered.css +12928 -3605
- package/package.json +20 -8
- package/css/gradient-text.css +0 -91
- package/css/icon-wrapper.css +0 -81
- package/css/segmented.css +0 -280
- package/css/toast.css +0 -499
package/css/tree.css
CHANGED
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
/* 定义 tree 样式。 */
|
|
7
7
|
|
|
8
|
+
/* 共享关键帧由 family/motion.css 提供,本皮肤 @import 它,单独引入仍成立。 */
|
|
9
|
+
@import '../family/motion.css';
|
|
8
10
|
@import '../family/collection-item.css';
|
|
11
|
+
@import '../family/loading-ring.css';
|
|
9
12
|
|
|
10
13
|
@layer xihan.components {
|
|
11
14
|
/* 皮肤在场的标记:开发模式下按 scope 探一次,取不到就说明这份皮肤没被引入。 */
|
|
@@ -14,10 +17,17 @@
|
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
[data-scope='tree'][data-part='root'] {
|
|
17
|
-
/*
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
/* 尺寸档只换这几支私有槽,行、指示符盒、缩进与占位从 root 继承,走集合家族的尺寸档:
|
|
21
|
+
行的块向内衬取列表条目档、行内内衬 / 间距 / 字号取控件档、指示符盒取指示符档、缩进一档一格 */
|
|
22
|
+
--xh-_tree-row-py: var(--xh-list-option-py-md);
|
|
23
|
+
--xh-_tree-row-px: var(--xh-control-px-md);
|
|
24
|
+
--xh-_tree-row-gap: var(--xh-control-gap-md);
|
|
25
|
+
--xh-_tree-font-size: var(--xh-control-font-md);
|
|
26
|
+
--xh-_tree-indicator: var(--xh-control-indicator-md);
|
|
27
|
+
--xh-_tree-indent: var(--xh-space-4);
|
|
28
|
+
/* 行外的字形(空态 / 在途占位里的加载环与作者塞的图标)按档取尺;行内的由家族随 data-xh-collection-size
|
|
29
|
+
下发。这支只管作者放进行里的图标:树自绘的状态字形(展开方向、行尾对号与半选杠)是指示符,
|
|
30
|
+
各部件在自己身上把 --xh-icon-size 改接到指示符盒的尺 */
|
|
21
31
|
--xh-icon-size: var(--xh-tree-icon-size, var(--xh-glyph-size-md));
|
|
22
32
|
|
|
23
33
|
display: flex;
|
|
@@ -25,6 +35,26 @@
|
|
|
25
35
|
gap: var(--xh-tree-gap, var(--xh-space-2));
|
|
26
36
|
}
|
|
27
37
|
|
|
38
|
+
[data-scope='tree'][data-part='root'][data-size='sm'] {
|
|
39
|
+
--xh-_tree-row-py: var(--xh-list-option-py-sm);
|
|
40
|
+
--xh-_tree-row-px: var(--xh-control-px-sm);
|
|
41
|
+
--xh-_tree-row-gap: var(--xh-control-gap-sm);
|
|
42
|
+
--xh-_tree-font-size: var(--xh-control-font-sm);
|
|
43
|
+
--xh-_tree-indicator: var(--xh-control-indicator-sm);
|
|
44
|
+
--xh-_tree-indent: var(--xh-space-3);
|
|
45
|
+
--xh-icon-size: var(--xh-tree-icon-size, var(--xh-glyph-size-sm));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
[data-scope='tree'][data-part='root'][data-size='lg'] {
|
|
49
|
+
--xh-_tree-row-py: var(--xh-list-option-py-lg);
|
|
50
|
+
--xh-_tree-row-px: var(--xh-control-px-lg);
|
|
51
|
+
--xh-_tree-row-gap: var(--xh-control-gap-lg);
|
|
52
|
+
--xh-_tree-font-size: var(--xh-control-font-lg);
|
|
53
|
+
--xh-_tree-indicator: var(--xh-control-indicator-lg);
|
|
54
|
+
--xh-_tree-indent: var(--xh-space-5);
|
|
55
|
+
--xh-icon-size: var(--xh-tree-icon-size, var(--xh-glyph-size-lg));
|
|
56
|
+
}
|
|
57
|
+
|
|
28
58
|
[data-scope='tree'][data-part='root'][hidden] {
|
|
29
59
|
display: none;
|
|
30
60
|
}
|
|
@@ -77,14 +107,16 @@
|
|
|
77
107
|
}
|
|
78
108
|
|
|
79
109
|
/* 空态占位:待在 root 里、tree 的兄弟(role=tree 只许拥有 treeitem 与 group)。
|
|
80
|
-
|
|
110
|
+
与在途占位同一副排版:一行居中的次要文字,字号与行内内衬随尺寸档与条目同档,块向内距一档 */
|
|
81
111
|
[data-scope='tree'][data-part='empty'] {
|
|
82
|
-
display:
|
|
112
|
+
display: flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
justify-content: center;
|
|
83
115
|
padding-block: var(--xh-tree-empty-py, var(--xh-space-3));
|
|
84
|
-
padding-inline: var(--xh-tree-empty-px, var(--xh-
|
|
85
|
-
color: var(--xh-tree-empty-fg, var(--xh-fg-
|
|
86
|
-
font-size: var(--xh-tree-empty-font-size, var(--xh-
|
|
87
|
-
line-height: var(--xh-leading-
|
|
116
|
+
padding-inline: var(--xh-tree-empty-px, var(--xh-_tree-row-px));
|
|
117
|
+
color: var(--xh-tree-empty-fg, var(--xh-fg-muted));
|
|
118
|
+
font-size: var(--xh-tree-empty-font-size, var(--xh-_tree-font-size));
|
|
119
|
+
line-height: var(--xh-leading-normal);
|
|
88
120
|
text-align: center;
|
|
89
121
|
}
|
|
90
122
|
|
|
@@ -97,17 +129,28 @@
|
|
|
97
129
|
color: var(--xh-fg-disabled);
|
|
98
130
|
}
|
|
99
131
|
|
|
100
|
-
/*
|
|
132
|
+
/* 在途占位:与空态占位同一个位置、同一副排版,两者不同屏。还没有节点时一枚加载环排在文案之前 */
|
|
101
133
|
[data-scope='tree'][data-part='loading'] {
|
|
102
|
-
display:
|
|
134
|
+
display: flex;
|
|
135
|
+
align-items: center;
|
|
136
|
+
justify-content: center;
|
|
137
|
+
gap: var(--xh-tree-loading-gap, var(--xh-_tree-row-gap));
|
|
103
138
|
padding-block: var(--xh-tree-loading-py, var(--xh-space-3));
|
|
104
|
-
padding-inline: var(--xh-tree-loading-px, var(--xh-
|
|
105
|
-
color: var(--xh-tree-loading-fg, var(--xh-fg-
|
|
106
|
-
font-size: var(--xh-tree-loading-font-size, var(--xh-
|
|
107
|
-
line-height: var(--xh-leading-
|
|
139
|
+
padding-inline: var(--xh-tree-loading-px, var(--xh-_tree-row-px));
|
|
140
|
+
color: var(--xh-tree-loading-fg, var(--xh-fg-muted));
|
|
141
|
+
font-size: var(--xh-tree-loading-font-size, var(--xh-_tree-font-size));
|
|
142
|
+
line-height: var(--xh-leading-normal);
|
|
108
143
|
text-align: center;
|
|
109
144
|
}
|
|
110
145
|
|
|
146
|
+
/* 环由加载环配方画成(轨道 + 起始边、随 data-loading 淡入并转),这里只给它盒子:直径取尺寸档的图标档 */
|
|
147
|
+
[data-scope='tree'][data-part='loading']::before {
|
|
148
|
+
content: '';
|
|
149
|
+
flex: none;
|
|
150
|
+
inline-size: var(--xh-icon-size, var(--xh-glyph-size-md));
|
|
151
|
+
block-size: var(--xh-icon-size, var(--xh-glyph-size-md));
|
|
152
|
+
}
|
|
153
|
+
|
|
111
154
|
[data-scope='tree'][data-part='loading'][hidden] {
|
|
112
155
|
display: none;
|
|
113
156
|
}
|
|
@@ -153,17 +196,17 @@
|
|
|
153
196
|
按钮,单列的 prefix 放不下;间距统一由行的 gap 给,家族按槽下发的外边距(--xh-collection-gap)归零 */
|
|
154
197
|
[data-scope='tree'][data-part='item'],
|
|
155
198
|
[data-scope='tree'][data-part='branch-control'] {
|
|
156
|
-
--xh-collection-block-padding: var(--xh-tree-row-py, var(--xh-
|
|
157
|
-
--xh-collection-inline-padding: var(--xh-tree-row-px, var(--xh-
|
|
199
|
+
--xh-collection-block-padding: var(--xh-tree-row-py, var(--xh-_tree-row-py));
|
|
200
|
+
--xh-collection-inline-padding: var(--xh-tree-row-px, var(--xh-_tree-row-px));
|
|
158
201
|
--xh-collection-gap: 0;
|
|
159
|
-
--xh-collection-font-size: var(--xh-tree-row-font-size, var(--xh-
|
|
160
|
-
--xh-collection-radius: var(--xh-tree-row-radius, var(--xh-shape-
|
|
202
|
+
--xh-collection-font-size: var(--xh-tree-row-font-size, var(--xh-_tree-font-size));
|
|
203
|
+
--xh-collection-radius: var(--xh-tree-row-radius, var(--xh-shape-inset));
|
|
161
204
|
/* 作者的图标尺槽经桥接槽下发到行,家族缺省按 md 档 */
|
|
162
205
|
--xh-collection-glyph-size: var(--xh-tree-icon-size, var(--xh-_collection-glyph-size));
|
|
163
|
-
/* 箭头 /
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
--xh-_tree-indicator-size: var(--xh-tree-indicator-size, var(--xh-
|
|
206
|
+
/* 箭头 / 对号盒与叶子的占位同一把尺:指示符档(md comfortable 16 / compact 14),与同一行里的
|
|
207
|
+
拖拽把手同一支。不读家族按档下发的 --xh-icon-size——那支只管作者放进行里的图标,按图标档取的
|
|
208
|
+
20px 会比 16px 的指示符盒大一圈 */
|
|
209
|
+
--xh-_tree-indicator-size: var(--xh-tree-indicator-size, var(--xh-_tree-indicator));
|
|
167
210
|
--xh-collection-fg-rest: var(--xh-tree-row-fg, var(--xh-fg-default));
|
|
168
211
|
--xh-collection-fg-hover: var(--xh-tree-row-fg, var(--xh-fg-default));
|
|
169
212
|
--xh-collection-fg-keyboard-highlight: var(--xh-tree-row-fg, var(--xh-fg-default));
|
|
@@ -195,26 +238,36 @@
|
|
|
195
238
|
|
|
196
239
|
display: flex;
|
|
197
240
|
align-items: center;
|
|
198
|
-
gap: var(--xh-tree-row-gap, var(--xh-
|
|
241
|
+
gap: var(--xh-tree-row-gap, var(--xh-_tree-row-gap));
|
|
199
242
|
/* 行高留出文字的上下伸展空间,行内那层 overflow:hidden 才不会把字削掉 */
|
|
200
243
|
line-height: var(--xh-tree-row-leading, var(--xh-leading-normal));
|
|
201
244
|
white-space: nowrap;
|
|
202
245
|
user-select: none;
|
|
203
|
-
/*
|
|
204
|
-
换父落点那圈内描边挂在行自己身上,跟着 data-drop
|
|
246
|
+
/* 换面走家族的时间线(按下 press,其余一律 micro,描边色同样不进过渡);box-shadow 一并接过渡:
|
|
247
|
+
换父落点那圈内描边挂在行自己身上,跟着 data-drop 在行间移动。
|
|
248
|
+
translate 是落下后的换位:宿主写回 collection 之后,连接层把行按旧位置反向补偿,这条过渡带它滑到新位置 */
|
|
205
249
|
transition:
|
|
206
|
-
background-color var(--xh-motion-duration-
|
|
250
|
+
background-color var(--xh-motion-duration-micro) var(--xh-motion-ease-enter),
|
|
207
251
|
color var(--xh-motion-duration-micro) var(--xh-motion-ease-enter),
|
|
208
|
-
box-shadow var(--xh-motion-duration-micro) var(--xh-motion-ease-enter)
|
|
252
|
+
box-shadow var(--xh-motion-duration-micro) var(--xh-motion-ease-enter),
|
|
253
|
+
opacity var(--xh-motion-duration-micro) var(--xh-motion-ease-enter),
|
|
254
|
+
translate var(--xh-motion-duration-move) var(--xh-motion-ease-continuous);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/* 已有节点时重新取数:不换成占位,行保留上一帧、按 micro 淡到禁用透明度,数据到了再淡回;
|
|
258
|
+
树框(描边与底)不淡,取数在途时行不接指针 */
|
|
259
|
+
[data-scope='tree'][data-part='tree'][data-loading] :is([data-scope='tree'][data-part='item'], [data-scope='tree'][data-part='branch-control']) {
|
|
260
|
+
opacity: var(--xh-tree-row-loading-opacity, var(--xh-state-disabled-opacity));
|
|
261
|
+
pointer-events: none;
|
|
209
262
|
}
|
|
210
263
|
|
|
211
264
|
/* 分支行的首格是展开箭头,叶子行没有这一格,由行盒自己补出来(对号在行尾,不再替叶子顶这一格),
|
|
212
265
|
否则叶子会比同级分支往行首缩一格,层级关系读不出来。占位宽度与箭头盒同一把尺 */
|
|
213
266
|
[data-orientation='vertical'] > [data-scope='tree'][data-part='item'] {
|
|
214
267
|
padding-inline-start: calc(
|
|
215
|
-
var(--xh-tree-row-px, var(--xh-
|
|
268
|
+
var(--xh-tree-row-px, var(--xh-_tree-row-px)) +
|
|
216
269
|
var(--xh-_tree-indicator-size) +
|
|
217
|
-
var(--xh-tree-row-gap, var(--xh-
|
|
270
|
+
var(--xh-tree-row-gap, var(--xh-_tree-row-gap))
|
|
218
271
|
);
|
|
219
272
|
}
|
|
220
273
|
|
|
@@ -230,7 +283,8 @@
|
|
|
230
283
|
--xh-collection-outline-keyboard-highlight: var(--xh-ring-focus);
|
|
231
284
|
--xh-collection-outline-selected-highlight: var(--xh-ring-focus);
|
|
232
285
|
|
|
233
|
-
|
|
286
|
+
/* 换面即时,只留换位:Alt + 方向键搬的正是这一行,它照样从旧位置滑到新位置 */
|
|
287
|
+
transition: translate var(--xh-motion-duration-move) var(--xh-motion-ease-continuous);
|
|
234
288
|
}
|
|
235
289
|
|
|
236
290
|
/* 禁用走 aria-disabled 而非原生 disabled:叶子的禁用面由家族按 aria-disabled 给;
|
|
@@ -273,7 +327,7 @@
|
|
|
273
327
|
/* 家族只按行的 aria-selected 显示对号:分支行的 aria-selected 在 branch 上、半选没有选中语义,
|
|
274
328
|
这两档按标记自身的 data-selected / data-indeterminate 显形 */
|
|
275
329
|
[data-scope='tree'][data-part='item-indicator']:is([data-selected], [data-indeterminate]) {
|
|
276
|
-
|
|
330
|
+
opacity: 1;
|
|
277
331
|
}
|
|
278
332
|
|
|
279
333
|
/* 分支行的禁用不在行的 aria-disabled 上(那在 branch 上),标记按自身的 data-disabled 降级 */
|
|
@@ -294,7 +348,7 @@
|
|
|
294
348
|
justify-content: center;
|
|
295
349
|
inline-size: var(--xh-_tree-indicator-size);
|
|
296
350
|
color: var(--xh-tree-branch-indicator-fg, var(--xh-fg-subtle));
|
|
297
|
-
transition: rotate var(--xh-motion-duration-
|
|
351
|
+
transition: rotate var(--xh-motion-duration-nudge) var(--xh-motion-ease-enter-strong);
|
|
298
352
|
}
|
|
299
353
|
|
|
300
354
|
[data-scope='tree'][data-part='branch-trigger'][hidden],
|
|
@@ -302,20 +356,15 @@
|
|
|
302
356
|
display: none;
|
|
303
357
|
}
|
|
304
358
|
|
|
305
|
-
/*
|
|
306
|
-
rtl
|
|
307
|
-
[data-scope='tree'][data-part='branch-trigger']
|
|
308
|
-
[data-scope='tree'][data-part='branch-indicator']
|
|
309
|
-
rotate: 90deg;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
[dir='rtl'] [data-scope='tree'][data-part='branch-trigger'],
|
|
313
|
-
[dir='rtl'] [data-scope='tree'][data-part='branch-indicator'] {
|
|
314
|
-
rotate: 180deg;
|
|
359
|
+
/* 收起时指向行尾、展开时转向下方,与逻辑书写方向一致:rtl 下行尾在左侧,收起的箭头转半圈;
|
|
360
|
+
旋转角乘书写方向的符号(ltr 0deg、rtl 180deg),按就近的 dir 走 */
|
|
361
|
+
[data-scope='tree'][data-part='branch-trigger'],
|
|
362
|
+
[data-scope='tree'][data-part='branch-indicator'] {
|
|
363
|
+
rotate: calc(90deg - 90deg * var(--xh-direction-sign));
|
|
315
364
|
}
|
|
316
365
|
|
|
317
|
-
[
|
|
318
|
-
[
|
|
366
|
+
[data-scope='tree'][data-part='branch-trigger'][data-state='open'],
|
|
367
|
+
[data-scope='tree'][data-part='branch-indicator'][data-state='open'] {
|
|
319
368
|
rotate: 90deg;
|
|
320
369
|
}
|
|
321
370
|
|
|
@@ -330,7 +379,31 @@
|
|
|
330
379
|
display: flex;
|
|
331
380
|
flex-direction: column;
|
|
332
381
|
gap: var(--xh-tree-branch-content-gap, var(--xh-list-option-gap));
|
|
333
|
-
padding-inline-start: var(--xh-tree-indent, var(--xh-
|
|
382
|
+
padding-inline-start: var(--xh-tree-indent, var(--xh-_tree-indent));
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/*
|
|
386
|
+
* 缩进参考线:每一层子节点的行首画一道竖线,对齐父节点展开箭头的中线,层级深时一眼看得出谁跟谁同层。
|
|
387
|
+
* 线画在子层容器自己的伪元素上:定位在子层里,只贯穿这一层的全部子孙,不越出父节点的范围。
|
|
388
|
+
* 它是内部分隔的一种,颜色取 border-subtle;行悬停与选中换面时线压在面上照样看得见
|
|
389
|
+
*/
|
|
390
|
+
[data-scope='tree'][data-part='tree'][data-lines] [data-scope='tree'][data-part='branch-content'] {
|
|
391
|
+
position: relative;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
[data-scope='tree'][data-part='tree'][data-lines] [data-scope='tree'][data-part='branch-content']::before {
|
|
395
|
+
content: '';
|
|
396
|
+
position: absolute;
|
|
397
|
+
inset-block: 0;
|
|
398
|
+
/* 父行的行首内边距加半个箭头盒:竖线正好落在父节点展开箭头的中线上 */
|
|
399
|
+
inset-inline-start: calc(
|
|
400
|
+
var(--xh-tree-row-px, var(--xh-_tree-row-px)) +
|
|
401
|
+
var(--xh-tree-indicator-size, var(--xh-_tree-indicator)) / 2 -
|
|
402
|
+
var(--xh-stroke-thin) / 2
|
|
403
|
+
);
|
|
404
|
+
inline-size: var(--xh-stroke-thin);
|
|
405
|
+
background: var(--xh-tree-line-color, var(--xh-border-subtle));
|
|
406
|
+
pointer-events: none;
|
|
334
407
|
}
|
|
335
408
|
|
|
336
409
|
/* 末端那一层横排:子节点并排铺开、必要时折行。缩进照旧由子层容器自己顶——
|
|
@@ -368,6 +441,8 @@
|
|
|
368
441
|
mask: var(--xh-glyph-mark-chevron-right) center / contain no-repeat;
|
|
369
442
|
}
|
|
370
443
|
|
|
444
|
+
/* 勾与半选杠叠成两层遮罩,按状态只换两层的尺寸:离开半选淡出的那一段里横杠留着,
|
|
445
|
+
淡出播完才换回勾——不在淡出途中闪出一枚勾 */
|
|
371
446
|
[data-scope='tree'][data-part='item-indicator']:empty::before {
|
|
372
447
|
content: '';
|
|
373
448
|
display: inline-block;
|
|
@@ -375,13 +450,48 @@
|
|
|
375
450
|
block-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
376
451
|
vertical-align: var(--xh-glyph-baseline-shift);
|
|
377
452
|
background-color: currentColor;
|
|
378
|
-
-webkit-mask: var(--xh-glyph-mark-check) center /
|
|
379
|
-
mask: var(--xh-glyph-mark-check) center /
|
|
453
|
+
-webkit-mask: var(--xh-glyph-mark-check) center / 100% 100% no-repeat, var(--xh-glyph-mark-minus) center / 0 0 no-repeat;
|
|
454
|
+
mask: var(--xh-glyph-mark-check) center / 100% 100% no-repeat, var(--xh-glyph-mark-minus) center / 0 0 no-repeat;
|
|
455
|
+
transition:
|
|
456
|
+
-webkit-mask-size 0s var(--xh-motion-duration-micro),
|
|
457
|
+
mask-size 0s var(--xh-motion-duration-micro);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
[data-scope='tree'][data-part='item-indicator'][data-selected]:empty::before {
|
|
461
|
+
transition-delay: 0s;
|
|
380
462
|
}
|
|
381
463
|
|
|
382
464
|
[data-scope='tree'][data-part='item-indicator'][data-indeterminate]:not([data-selected]):empty::before {
|
|
383
|
-
-webkit-mask-
|
|
384
|
-
mask-
|
|
465
|
+
-webkit-mask-size: 0 0, 100% 100%;
|
|
466
|
+
mask-size: 0 0, 100% 100%;
|
|
467
|
+
transition-delay: 0s;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
/* 这一枝在取子节点:展开箭头换成转圈,不再按开合转向;只换字形,颜色沿用箭头的弱前景 */
|
|
471
|
+
[data-scope='tree'][data-part='branch'][data-loading] > [data-scope='tree'][data-part='branch-control'] [data-scope='tree'][data-part='branch-trigger'],
|
|
472
|
+
[data-scope='tree'][data-part='branch'][data-loading] > [data-scope='tree'][data-part='branch-control'] [data-scope='tree'][data-part='branch-indicator'] {
|
|
473
|
+
rotate: none;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
[data-scope='tree'][data-part='branch'][data-loading] > [data-scope='tree'][data-part='branch-control'] [data-scope='tree'][data-part='branch-trigger']:empty::before,
|
|
477
|
+
[data-scope='tree'][data-part='branch'][data-loading] > [data-scope='tree'][data-part='branch-control'] [data-scope='tree'][data-part='branch-indicator']:empty::before {
|
|
478
|
+
-webkit-mask-image: var(--xh-glyph-mark-rotate-right);
|
|
479
|
+
mask-image: var(--xh-glyph-mark-rotate-right);
|
|
480
|
+
animation: xh-spin var(--xh-motion-loop-spin) var(--xh-motion-ease-loop) infinite;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/* 减少动效:转圈停下,静止的箭头仍然读得出「还没好」,在途由分支的 aria-busy 念出。
|
|
484
|
+
两组规则是同一件事的两个触发条件:系统偏好与作者打的 data-motion */
|
|
485
|
+
@media (prefers-reduced-motion: reduce) {
|
|
486
|
+
[data-scope='tree'][data-part='branch'][data-loading] > [data-scope='tree'][data-part='branch-control'] [data-scope='tree'][data-part='branch-trigger']:empty::before,
|
|
487
|
+
[data-scope='tree'][data-part='branch'][data-loading] > [data-scope='tree'][data-part='branch-control'] [data-scope='tree'][data-part='branch-indicator']:empty::before {
|
|
488
|
+
animation: none;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
:where([data-motion='reduce']) [data-scope='tree'][data-part='branch'][data-loading] > [data-scope='tree'][data-part='branch-control'] [data-scope='tree'][data-part='branch-trigger']:empty::before,
|
|
493
|
+
:where([data-motion='reduce']) [data-scope='tree'][data-part='branch'][data-loading] > [data-scope='tree'][data-part='branch-control'] [data-scope='tree'][data-part='branch-indicator']:empty::before {
|
|
494
|
+
animation: none;
|
|
385
495
|
}
|
|
386
496
|
|
|
387
497
|
/* —— 节点拖拽搬家 —— */
|
|
@@ -402,8 +512,8 @@
|
|
|
402
512
|
flex: none;
|
|
403
513
|
align-items: center;
|
|
404
514
|
justify-content: center;
|
|
405
|
-
inline-size: var(--xh-tree-drag-size, var(--xh-
|
|
406
|
-
block-size: var(--xh-tree-drag-size, var(--xh-
|
|
515
|
+
inline-size: var(--xh-tree-drag-size, var(--xh-_tree-indicator));
|
|
516
|
+
block-size: var(--xh-tree-drag-size, var(--xh-_tree-indicator));
|
|
407
517
|
border-radius: var(--xh-tree-drag-radius, var(--xh-shape-control));
|
|
408
518
|
color: var(--xh-tree-drag-fg, var(--xh-fg-subtle));
|
|
409
519
|
cursor: grab;
|
|
@@ -467,7 +577,7 @@
|
|
|
467
577
|
position: absolute;
|
|
468
578
|
inset-inline: 0;
|
|
469
579
|
block-size: var(--xh-tree-drop-line, var(--xh-stroke-thick));
|
|
470
|
-
background: var(--xh-tree-drop-fg, var(--xh-
|
|
580
|
+
background: var(--xh-tree-drop-fg, var(--xh-bg-brand));
|
|
471
581
|
}
|
|
472
582
|
|
|
473
583
|
/* 落在上沿还是下沿走逻辑属性,块向跟着书写模式走。
|
|
@@ -492,7 +602,7 @@
|
|
|
492
602
|
/* 落点不是选中:品牌淡底专属选中 / 当前,落点面取悬停之上一档的中性面 */
|
|
493
603
|
background: var(--xh-tree-drop-inside-bg, var(--xh-bg-subtle-hover));
|
|
494
604
|
box-shadow: inset 0 0 0 var(--xh-tree-drop-line, var(--xh-stroke-thick))
|
|
495
|
-
var(--xh-tree-drop-fg, var(--xh-
|
|
605
|
+
var(--xh-tree-drop-fg, var(--xh-bg-brand));
|
|
496
606
|
}
|
|
497
607
|
|
|
498
608
|
/* 活动区域只说给读屏听,不占版面。声明与 shared/visually-hidden.ts 逐条同值。 */
|
|
@@ -513,5 +623,41 @@
|
|
|
513
623
|
[data-scope='tree'][data-part='item-indicator'] {
|
|
514
624
|
print-color-adjust: exact;
|
|
515
625
|
}
|
|
626
|
+
|
|
627
|
+
/* 转了一半的圈定格在纸上没有意义,停下 */
|
|
628
|
+
[data-scope='tree'][data-part='branch'][data-loading] > [data-scope='tree'][data-part='branch-control'] [data-scope='tree'][data-part='branch-trigger']:empty::before,
|
|
629
|
+
[data-scope='tree'][data-part='branch'][data-loading] > [data-scope='tree'][data-part='branch-control'] [data-scope='tree'][data-part='branch-indicator']:empty::before {
|
|
630
|
+
animation: none;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
/* 强制色:参考线是一块底色,系统色下会被抹成 Canvas;换成 GrayText 并只让这条线不参与强制换色 */
|
|
635
|
+
@media (forced-colors: active) {
|
|
636
|
+
[data-scope='tree'][data-part='tree'][data-lines] [data-scope='tree'][data-part='branch-content']::before {
|
|
637
|
+
background: GrayText;
|
|
638
|
+
forced-color-adjust: none;
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
@media (forced-colors: active) {
|
|
643
|
+
/* 兜底字形是 mask 挖出来的一块底色,这一档里底色被系统换成 Canvas,字形跟着消失。
|
|
644
|
+
字形退出强制换色、直接写系统色(不能取 currentColor:退出强制换色的伪元素读到的是被系统换掉之前的作者色):
|
|
645
|
+
条目面上取 CanvasText;按下与没被高亮时的悬停,家族把条目涂成 Highlight,字形换 HighlightText;
|
|
646
|
+
禁用取 GrayText */
|
|
647
|
+
[data-scope='tree']:is([data-part='branch-trigger'], [data-part='branch-indicator']):empty::before,
|
|
648
|
+
[data-scope='tree'][data-part='item-indicator']:empty::before {
|
|
649
|
+
forced-color-adjust: none;
|
|
650
|
+
background-color: CanvasText;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
[data-scope='tree'][data-part='branch-control']:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:active, [data-pressed], :hover:not(:focus-visible, [data-highlighted])) [data-scope='tree']:is([data-part='branch-trigger'], [data-part='branch-indicator']):empty::before,
|
|
654
|
+
[data-scope='tree'][data-part='item']:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:active, [data-pressed], :hover:not(:focus-visible, [data-highlighted])) [data-scope='tree'][data-part='item-indicator']:empty::before {
|
|
655
|
+
background-color: HighlightText;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
[data-scope='tree'][data-part='branch-control']:is([aria-disabled='true'], [data-disabled]) [data-scope='tree']:is([data-part='branch-trigger'], [data-part='branch-indicator']):empty::before,
|
|
659
|
+
[data-scope='tree'][data-part='item']:is([aria-disabled='true'], [data-disabled]) [data-scope='tree'][data-part='item-indicator']:empty::before {
|
|
660
|
+
background-color: GrayText;
|
|
661
|
+
}
|
|
516
662
|
}
|
|
517
663
|
}
|
package/css/truncate.css
CHANGED
|
@@ -42,24 +42,67 @@
|
|
|
42
42
|
white-space: normal;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
/*
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
/* —— 中间省略 —— */
|
|
46
|
+
/* 盒子里的原文照旧排着、只是不上色:溢出照它量,读屏照它念,选中与复制拿到的也是整段。
|
|
47
|
+
看得见的两段由两个伪元素画:前一半从头排、末尾收省略号,后一半从尾排、开头直接截断,
|
|
48
|
+
两段各占一半宽度,拼起来就是省略号落在中间的那一版 */
|
|
49
|
+
[data-scope='truncate'][data-part='root'][data-middle-text] {
|
|
50
|
+
position: relative;
|
|
51
|
+
text-overflow: clip;
|
|
52
|
+
-webkit-text-fill-color: transparent;
|
|
51
53
|
}
|
|
52
54
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
[data-scope='truncate'][data-part='root'][data-middle-text]::before,
|
|
56
|
+
[data-scope='truncate'][data-part='root'][data-middle-text]::after {
|
|
57
|
+
position: absolute;
|
|
58
|
+
inset-block: 0;
|
|
59
|
+
inline-size: 50%;
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
white-space: nowrap;
|
|
62
|
+
-webkit-text-fill-color: currentColor;
|
|
63
|
+
pointer-events: none;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* 替代文字给空串:这两段只是画出来的样子,读屏念的是盒子里的原文 */
|
|
67
|
+
[data-scope='truncate'][data-part='root'][data-middle-text]::before {
|
|
68
|
+
content: attr(data-middle-text) / '';
|
|
69
|
+
inset-inline-start: 0;
|
|
70
|
+
text-overflow: ellipsis;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* 后一半的盒子贴在末尾侧,文字照正文的方向排:弹性容器按末端对齐,放不下的部分从起始侧溢出,
|
|
74
|
+
露出来的正是原文的结尾。不翻方向,也就不用分书写方向各写一版 */
|
|
75
|
+
[data-scope='truncate'][data-part='root'][data-middle-text]::after {
|
|
76
|
+
content: attr(data-middle-text) / '';
|
|
77
|
+
inset-inline-end: 0;
|
|
78
|
+
display: flex;
|
|
79
|
+
justify-content: flex-end;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* —— 展开按钮 —— */
|
|
83
|
+
/* 盒型、悬停与按下面由 Action Control 的文字档给(ghost、sm);排在文字盒子之后另起一行,
|
|
84
|
+
起始端对齐正文,不被外层的弹性布局拉宽 */
|
|
85
|
+
[data-scope='truncate'][data-part='trigger'] {
|
|
86
|
+
flex: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@media (forced-colors: active) {
|
|
90
|
+
/* 这一档不保证文字填色照写的走:退回末尾省略,原文按系统色直接显示 */
|
|
91
|
+
[data-scope='truncate'][data-part='root'][data-middle-text] {
|
|
92
|
+
text-overflow: ellipsis;
|
|
93
|
+
-webkit-text-fill-color: currentColor;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
[data-scope='truncate'][data-part='root'][data-middle-text]::before,
|
|
97
|
+
[data-scope='truncate'][data-part='root'][data-middle-text]::after {
|
|
98
|
+
content: none;
|
|
99
|
+
}
|
|
58
100
|
}
|
|
59
101
|
|
|
60
102
|
/* 声明过任何 display 就盖掉了 UA 的 [hidden]{display:none},收起态得自己还回去。
|
|
61
103
|
写在文件末尾:兜底必须排在该部件所有 display 声明之后 */
|
|
62
|
-
[data-scope='truncate'][data-part='root'][hidden]
|
|
104
|
+
[data-scope='truncate'][data-part='root'][hidden],
|
|
105
|
+
[data-scope='truncate'][data-part='trigger'][hidden] {
|
|
63
106
|
display: none;
|
|
64
107
|
}
|
|
65
108
|
}
|
package/css/typography.css
CHANGED
|
@@ -6,6 +6,17 @@
|
|
|
6
6
|
/* 定义 typography 样式。 */
|
|
7
7
|
|
|
8
8
|
@layer xihan.components {
|
|
9
|
+
/* 渐变字的前景:缺省透明,透出裁进字形的渐变;高对比作用域里换成实色,盖住渐变。
|
|
10
|
+
轴边界上只路由这一个简单值,渐变本身仍在文字上按本地的两端颜色与走向求值,
|
|
11
|
+
内层 default / more 能双向重置,也不会把未解析的组件变量冻结在祖先上。 */
|
|
12
|
+
:where(:root, [data-contrast='default']) {
|
|
13
|
+
--xh-_typography-gradient-fg: transparent;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:where([data-contrast='more']) {
|
|
17
|
+
--xh-_typography-gradient-fg: var(--xh-fg-default);
|
|
18
|
+
}
|
|
19
|
+
|
|
9
20
|
/* 皮肤在场的标记:开发模式下按 scope 探一次,取不到就说明这份皮肤没被引入。 */
|
|
10
21
|
[data-scope='typography'] {
|
|
11
22
|
--xh-typography-skin: 1;
|
|
@@ -183,6 +194,37 @@
|
|
|
183
194
|
color: var(--xh-typography-text-fg-tone, var(--xh-_tone-fg));
|
|
184
195
|
}
|
|
185
196
|
|
|
197
|
+
/* 删除线与下划线是同一条装饰线的两个取值,两个开关都开时两条都画 */
|
|
198
|
+
[data-scope='typography'][data-part='text'][data-strikethrough] {
|
|
199
|
+
text-decoration-line: line-through;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
[data-scope='typography'][data-part='text'][data-underline] {
|
|
203
|
+
text-decoration-line: underline;
|
|
204
|
+
text-underline-offset: var(--xh-typography-text-underline-offset, var(--xh-space-0_5));
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
[data-scope='typography'][data-part='text'][data-underline][data-strikethrough] {
|
|
208
|
+
text-decoration-line: underline line-through;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/* 标记:与文本高亮的命中片段同一副淡底、字色与收边,两处被标出的文字看起来是一回事。
|
|
212
|
+
排在语气之后:同时写语气时底与字色一起换成该族,只写语气不写标记仍只换字色。
|
|
213
|
+
跨行时两半各自收边,否则圆角与内边距只画在整段的首尾;两条都写:WebKit 只认带前缀那条 */
|
|
214
|
+
[data-scope='typography'][data-part='text'][data-marked] {
|
|
215
|
+
padding-inline: var(--xh-typography-mark-px, var(--xh-space-0_5));
|
|
216
|
+
border-radius: var(--xh-typography-mark-radius, var(--xh-shape-inset));
|
|
217
|
+
background: var(--xh-typography-mark-bg, var(--xh-bg-brand-subtle));
|
|
218
|
+
color: var(--xh-typography-mark-fg, var(--xh-fg-brand-strong));
|
|
219
|
+
-webkit-box-decoration-break: clone;
|
|
220
|
+
box-decoration-break: clone;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
[data-scope='typography'][data-part='text'][data-marked][data-tone] {
|
|
224
|
+
background: var(--xh-typography-mark-bg, var(--xh-_tone-subtle));
|
|
225
|
+
color: var(--xh-typography-mark-fg, var(--xh-_tone-fg));
|
|
226
|
+
}
|
|
227
|
+
|
|
186
228
|
/* 字重排在形态之后:与 strong 一起写时,粗到哪一档由字重说了算 */
|
|
187
229
|
[data-scope='typography'][data-part='text'][data-weight='regular'] {
|
|
188
230
|
font-weight: var(--xh-font-weight-regular);
|
|
@@ -200,6 +242,42 @@
|
|
|
200
242
|
font-weight: var(--xh-font-weight-bold);
|
|
201
243
|
}
|
|
202
244
|
|
|
245
|
+
/* —— 渐变字 —— */
|
|
246
|
+
/* 渐变画在背景上,再用 background-clip 把背景裁进字形里;前景必须透明才透得出底下的渐变。
|
|
247
|
+
两条 background-clip 都写:WebKit 只认带前缀那条。
|
|
248
|
+
-webkit-text-fill-color 在 WebKit 里决定字形填充色并盖过 color,跟着 color 走。
|
|
249
|
+
排在语气之后:语气写的是前景色,渐变字的前景要留给上面那支透明槽 */
|
|
250
|
+
[data-scope='typography'][data-part='text'][data-variant='gradient'] {
|
|
251
|
+
/* 两端颜色各收一个私有槽:语气档换的是这两支,使用者槽仍排在它们前面 */
|
|
252
|
+
--xh-_typography-gradient-from: var(--xh-gradient-brand-from);
|
|
253
|
+
--xh-_typography-gradient-to: var(--xh-gradient-brand-to);
|
|
254
|
+
|
|
255
|
+
background-image: linear-gradient(
|
|
256
|
+
var(--xh-typography-gradient-direction, to right),
|
|
257
|
+
var(--xh-typography-gradient-from, var(--xh-_typography-gradient-from)),
|
|
258
|
+
var(--xh-typography-gradient-to, var(--xh-_typography-gradient-to))
|
|
259
|
+
);
|
|
260
|
+
-webkit-background-clip: text;
|
|
261
|
+
background-clip: text;
|
|
262
|
+
color: var(--xh-_typography-gradient-fg);
|
|
263
|
+
-webkit-text-fill-color: currentColor;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/* 语气换的是两端颜色:取该族主色与它压深一档的取值,深浅两态自动跟随 */
|
|
267
|
+
[data-scope='typography'][data-part='text'][data-variant='gradient'][data-tone] {
|
|
268
|
+
--xh-_typography-gradient-from: var(--xh-_tone);
|
|
269
|
+
--xh-_typography-gradient-to: var(--xh-_tone-active);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/* 无 JS 时的系统高对比、强制色与打印统一退回单色;显式局部轴由文件头那支前景槽负责 */
|
|
273
|
+
@media (prefers-contrast: more), (forced-colors: active), print {
|
|
274
|
+
[data-scope='typography'][data-part='text'][data-variant='gradient'] {
|
|
275
|
+
background-image: none;
|
|
276
|
+
color: inherit;
|
|
277
|
+
-webkit-text-fill-color: currentColor;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
203
281
|
/* —— 行内链接 —— */
|
|
204
282
|
[data-scope='typography'][data-part='link'] {
|
|
205
283
|
border-radius: var(--xh-typography-link-radius, var(--xh-shape-inset));
|
|
@@ -376,4 +454,19 @@
|
|
|
376
454
|
[data-scope='typography'][data-part='prose'] :where(th) {
|
|
377
455
|
font-weight: var(--xh-typography-prose-th-font-weight, var(--xh-font-weight-semibold));
|
|
378
456
|
}
|
|
457
|
+
|
|
458
|
+
@media (forced-colors: active) {
|
|
459
|
+
/* 这一档里自定义底色一律被换成 Canvas,标记会与正文分不开;用系统高亮反色把那一段画回来 */
|
|
460
|
+
[data-scope='typography'][data-part='text'][data-marked] {
|
|
461
|
+
background: Highlight;
|
|
462
|
+
color: HighlightText;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
@media print {
|
|
467
|
+
/* 打印默认丢底色,标记只剩字色,被标出的那段在纸上就不显眼了 */
|
|
468
|
+
[data-scope='typography'][data-part='text'][data-marked] {
|
|
469
|
+
print-color-adjust: exact;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
379
472
|
}
|