@xihan-ui/styles 2.1.0 → 3.1.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 +1261 -0
- package/README.md +6 -1
- package/component-tokens.d.ts +533 -96
- package/components.tokens.json +35461 -26045
- 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 +128 -50
- 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 +56 -0
- package/css/date-picker.css +132 -26
- package/css/date-range-picker.css +337 -14
- 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 +20 -18
- package/css/file-upload.css +125 -135
- package/css/flex.css +324 -8
- package/css/float-button.css +263 -38
- package/css/floating-panel.css +53 -19
- package/css/form.css +31 -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 +435 -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 +175 -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 +103 -17
- 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 +271 -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 +13824 -4030
- package/index.unlayered.css +13403 -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,93 @@
|
|
|
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
|
+
* 线由每个子节点自己画:子节点的行画「这一段竖线 + 横出的那一段」,展开着的非末位分支再由它的子层
|
|
389
|
+
* 把竖线接过它整棵子树,交给下一个兄弟。子节点之间、分支行与子层之间的间距由线向上下伸出补齐,竖线不断开。
|
|
390
|
+
* 只画在竖排的子层里:顶层节点没有父节点可连,横排的末端层没有行首可接。
|
|
391
|
+
* 首个与末位子节点按子层里的结构次序认:子层里只放节点,收起的子树整块不显示、不影响次序。
|
|
392
|
+
* 它是内部分隔的一种,颜色取 border-subtle;行悬停与选中换面时线压在面上照样看得见
|
|
393
|
+
*/
|
|
394
|
+
[data-scope='tree'][data-part='tree'][data-lines] [data-scope='tree'][data-part='branch-content'] {
|
|
395
|
+
position: relative;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/* 竖线落在父节点展开箭头的中线上:父行的行首内边距加半个箭头盒,换算到缩进了一格的子节点坐标里。
|
|
399
|
+
向上伸出的量补的是上方那段间距(首个子节点补分支行与子层之间的那段),向下补到下一个兄弟 */
|
|
400
|
+
[data-scope='tree'][data-part='tree'][data-lines] [data-scope='tree'][data-part='branch-content'][data-orientation='vertical'] > [data-scope='tree'][data-part='item'],
|
|
401
|
+
[data-scope='tree'][data-part='tree'][data-lines] [data-scope='tree'][data-part='branch-content'][data-orientation='vertical'] > [data-scope='tree'][data-part='branch'] > [data-scope='tree'][data-part='branch-control'] {
|
|
402
|
+
--xh-_tree-line-x: calc(
|
|
403
|
+
var(--xh-tree-row-px, var(--xh-_tree-row-px)) +
|
|
404
|
+
var(--xh-_tree-indicator-size) / 2 -
|
|
405
|
+
var(--xh-stroke-thin) / 2 -
|
|
406
|
+
var(--xh-tree-indent, var(--xh-_tree-indent))
|
|
407
|
+
);
|
|
408
|
+
--xh-_tree-line-top: 0px;
|
|
409
|
+
--xh-_tree-line-bottom: var(--xh-tree-branch-content-gap, var(--xh-list-option-gap));
|
|
410
|
+
|
|
411
|
+
position: relative;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
[data-scope='tree'][data-part='tree'][data-lines] [data-scope='tree'][data-part='branch-content'][data-orientation='vertical'] > [data-scope='tree'][data-part='item']:first-child,
|
|
415
|
+
[data-scope='tree'][data-part='tree'][data-lines] [data-scope='tree'][data-part='branch-content'][data-orientation='vertical'] > [data-scope='tree'][data-part='branch']:first-child > [data-scope='tree'][data-part='branch-control'] {
|
|
416
|
+
--xh-_tree-line-top: var(--xh-tree-branch-gap, var(--xh-list-option-gap));
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/* 展开着的非末位分支:行下面先是它自己的子层,竖线只伸到子层顶上,余下那段由子层接着画 */
|
|
420
|
+
[data-scope='tree'][data-part='tree'][data-lines] [data-scope='tree'][data-part='branch-content'][data-orientation='vertical'] > [data-scope='tree'][data-part='branch'] > [data-scope='tree'][data-part='branch-control'][data-state='open'] {
|
|
421
|
+
--xh-_tree-line-bottom: var(--xh-tree-branch-gap, var(--xh-list-option-gap));
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
[data-scope='tree'][data-part='tree'][data-lines] [data-scope='tree'][data-part='branch-content'][data-orientation='vertical'] > [data-scope='tree'][data-part='item']::before,
|
|
425
|
+
[data-scope='tree'][data-part='tree'][data-lines] [data-scope='tree'][data-part='branch-content'][data-orientation='vertical'] > [data-scope='tree'][data-part='branch'] > [data-scope='tree'][data-part='branch-control']::before {
|
|
426
|
+
content: '';
|
|
427
|
+
position: absolute;
|
|
428
|
+
inset-block: calc(var(--xh-_tree-line-top) * -1) calc(var(--xh-_tree-line-bottom) * -1);
|
|
429
|
+
inset-inline-start: var(--xh-_tree-line-x);
|
|
430
|
+
/* 分支横出到展开箭头盒的起点;叶子没有箭头,横线穿过占位那一格接到正文前 */
|
|
431
|
+
inline-size: calc(var(--xh-tree-row-px, var(--xh-_tree-row-px)) - var(--xh-_tree-line-x));
|
|
432
|
+
border-inline-start: var(--xh-stroke-thin) solid var(--xh-tree-line-color, var(--xh-border-subtle));
|
|
433
|
+
/* 横出的那段落在行的中线:线盒上下伸出的量不对称时按差值的一半补回 */
|
|
434
|
+
background: linear-gradient(var(--xh-tree-line-color, var(--xh-border-subtle)), var(--xh-tree-line-color, var(--xh-border-subtle)))
|
|
435
|
+
0 calc(50% + (var(--xh-_tree-line-top) - var(--xh-_tree-line-bottom)) / 2) / 100% var(--xh-stroke-thin) no-repeat;
|
|
436
|
+
pointer-events: none;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
[data-scope='tree'][data-part='tree'][data-lines] [data-scope='tree'][data-part='branch-content'][data-orientation='vertical'] > [data-scope='tree'][data-part='item']::before {
|
|
440
|
+
inline-size: calc(
|
|
441
|
+
var(--xh-tree-row-px, var(--xh-_tree-row-px)) +
|
|
442
|
+
var(--xh-_tree-indicator-size) -
|
|
443
|
+
var(--xh-_tree-line-x)
|
|
444
|
+
);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/* 最后一个子节点:竖线止于行的中线并在那里拐向行首(└),下面不再有兄弟要接 */
|
|
448
|
+
[data-scope='tree'][data-part='tree'][data-lines] [data-scope='tree'][data-part='branch-content'][data-orientation='vertical'] > [data-scope='tree'][data-part='item']:last-child::before,
|
|
449
|
+
[data-scope='tree'][data-part='tree'][data-lines] [data-scope='tree'][data-part='branch-content'][data-orientation='vertical'] > [data-scope='tree'][data-part='branch']:last-child > [data-scope='tree'][data-part='branch-control']::before {
|
|
450
|
+
inset-block-end: calc(50% - var(--xh-stroke-thin) / 2);
|
|
451
|
+
border-block-end: var(--xh-stroke-thin) solid var(--xh-tree-line-color, var(--xh-border-subtle));
|
|
452
|
+
background: none;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/* 展开着的非末位分支:它的子层把父节点那道竖线接过整棵子树,一直伸到下一个兄弟。
|
|
456
|
+
子层的盒与分支同起点(缩进是子层自己的内边距),竖线位置与分支行里那一段相同 */
|
|
457
|
+
[data-scope='tree'][data-part='tree'][data-lines] [data-scope='tree'][data-part='branch-content'][data-orientation='vertical'] > [data-scope='tree'][data-part='branch']:not(:last-child) > [data-scope='tree'][data-part='branch-content']::after {
|
|
458
|
+
content: '';
|
|
459
|
+
position: absolute;
|
|
460
|
+
inset-block: 0 calc(var(--xh-tree-branch-content-gap, var(--xh-list-option-gap)) * -1);
|
|
461
|
+
inset-inline-start: calc(
|
|
462
|
+
var(--xh-tree-row-px, var(--xh-_tree-row-px)) +
|
|
463
|
+
var(--xh-tree-indicator-size, var(--xh-_tree-indicator)) / 2 -
|
|
464
|
+
var(--xh-stroke-thin) / 2 -
|
|
465
|
+
var(--xh-tree-indent, var(--xh-_tree-indent))
|
|
466
|
+
);
|
|
467
|
+
border-inline-start: var(--xh-stroke-thin) solid var(--xh-tree-line-color, var(--xh-border-subtle));
|
|
468
|
+
pointer-events: none;
|
|
334
469
|
}
|
|
335
470
|
|
|
336
471
|
/* 末端那一层横排:子节点并排铺开、必要时折行。缩进照旧由子层容器自己顶——
|
|
@@ -368,6 +503,8 @@
|
|
|
368
503
|
mask: var(--xh-glyph-mark-chevron-right) center / contain no-repeat;
|
|
369
504
|
}
|
|
370
505
|
|
|
506
|
+
/* 勾与半选杠叠成两层遮罩,按状态只换两层的尺寸:离开半选淡出的那一段里横杠留着,
|
|
507
|
+
淡出播完才换回勾——不在淡出途中闪出一枚勾 */
|
|
371
508
|
[data-scope='tree'][data-part='item-indicator']:empty::before {
|
|
372
509
|
content: '';
|
|
373
510
|
display: inline-block;
|
|
@@ -375,13 +512,48 @@
|
|
|
375
512
|
block-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
376
513
|
vertical-align: var(--xh-glyph-baseline-shift);
|
|
377
514
|
background-color: currentColor;
|
|
378
|
-
-webkit-mask: var(--xh-glyph-mark-check) center /
|
|
379
|
-
mask: var(--xh-glyph-mark-check) center /
|
|
515
|
+
-webkit-mask: var(--xh-glyph-mark-check) center / 100% 100% no-repeat, var(--xh-glyph-mark-minus) center / 0 0 no-repeat;
|
|
516
|
+
mask: var(--xh-glyph-mark-check) center / 100% 100% no-repeat, var(--xh-glyph-mark-minus) center / 0 0 no-repeat;
|
|
517
|
+
transition:
|
|
518
|
+
-webkit-mask-size 0s var(--xh-motion-duration-micro),
|
|
519
|
+
mask-size 0s var(--xh-motion-duration-micro);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
[data-scope='tree'][data-part='item-indicator'][data-selected]:empty::before {
|
|
523
|
+
transition-delay: 0s;
|
|
380
524
|
}
|
|
381
525
|
|
|
382
526
|
[data-scope='tree'][data-part='item-indicator'][data-indeterminate]:not([data-selected]):empty::before {
|
|
383
|
-
-webkit-mask-
|
|
384
|
-
mask-
|
|
527
|
+
-webkit-mask-size: 0 0, 100% 100%;
|
|
528
|
+
mask-size: 0 0, 100% 100%;
|
|
529
|
+
transition-delay: 0s;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
/* 这一枝在取子节点:展开箭头换成转圈,不再按开合转向;只换字形,颜色沿用箭头的弱前景 */
|
|
533
|
+
[data-scope='tree'][data-part='branch'][data-loading] > [data-scope='tree'][data-part='branch-control'] [data-scope='tree'][data-part='branch-trigger'],
|
|
534
|
+
[data-scope='tree'][data-part='branch'][data-loading] > [data-scope='tree'][data-part='branch-control'] [data-scope='tree'][data-part='branch-indicator'] {
|
|
535
|
+
rotate: none;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
[data-scope='tree'][data-part='branch'][data-loading] > [data-scope='tree'][data-part='branch-control'] [data-scope='tree'][data-part='branch-trigger']:empty::before,
|
|
539
|
+
[data-scope='tree'][data-part='branch'][data-loading] > [data-scope='tree'][data-part='branch-control'] [data-scope='tree'][data-part='branch-indicator']:empty::before {
|
|
540
|
+
-webkit-mask-image: var(--xh-glyph-mark-rotate-right);
|
|
541
|
+
mask-image: var(--xh-glyph-mark-rotate-right);
|
|
542
|
+
animation: xh-spin var(--xh-motion-loop-spin) var(--xh-motion-ease-loop) infinite;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
/* 减少动效:转圈停下,静止的箭头仍然读得出「还没好」,在途由分支的 aria-busy 念出。
|
|
546
|
+
两组规则是同一件事的两个触发条件:系统偏好与作者打的 data-motion */
|
|
547
|
+
@media (prefers-reduced-motion: reduce) {
|
|
548
|
+
[data-scope='tree'][data-part='branch'][data-loading] > [data-scope='tree'][data-part='branch-control'] [data-scope='tree'][data-part='branch-trigger']:empty::before,
|
|
549
|
+
[data-scope='tree'][data-part='branch'][data-loading] > [data-scope='tree'][data-part='branch-control'] [data-scope='tree'][data-part='branch-indicator']:empty::before {
|
|
550
|
+
animation: none;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
: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,
|
|
555
|
+
: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 {
|
|
556
|
+
animation: none;
|
|
385
557
|
}
|
|
386
558
|
|
|
387
559
|
/* —— 节点拖拽搬家 —— */
|
|
@@ -402,8 +574,8 @@
|
|
|
402
574
|
flex: none;
|
|
403
575
|
align-items: center;
|
|
404
576
|
justify-content: center;
|
|
405
|
-
inline-size: var(--xh-tree-drag-size, var(--xh-
|
|
406
|
-
block-size: var(--xh-tree-drag-size, var(--xh-
|
|
577
|
+
inline-size: var(--xh-tree-drag-size, var(--xh-_tree-indicator));
|
|
578
|
+
block-size: var(--xh-tree-drag-size, var(--xh-_tree-indicator));
|
|
407
579
|
border-radius: var(--xh-tree-drag-radius, var(--xh-shape-control));
|
|
408
580
|
color: var(--xh-tree-drag-fg, var(--xh-fg-subtle));
|
|
409
581
|
cursor: grab;
|
|
@@ -467,7 +639,7 @@
|
|
|
467
639
|
position: absolute;
|
|
468
640
|
inset-inline: 0;
|
|
469
641
|
block-size: var(--xh-tree-drop-line, var(--xh-stroke-thick));
|
|
470
|
-
background: var(--xh-tree-drop-fg, var(--xh-
|
|
642
|
+
background: var(--xh-tree-drop-fg, var(--xh-bg-brand));
|
|
471
643
|
}
|
|
472
644
|
|
|
473
645
|
/* 落在上沿还是下沿走逻辑属性,块向跟着书写模式走。
|
|
@@ -492,7 +664,7 @@
|
|
|
492
664
|
/* 落点不是选中:品牌淡底专属选中 / 当前,落点面取悬停之上一档的中性面 */
|
|
493
665
|
background: var(--xh-tree-drop-inside-bg, var(--xh-bg-subtle-hover));
|
|
494
666
|
box-shadow: inset 0 0 0 var(--xh-tree-drop-line, var(--xh-stroke-thick))
|
|
495
|
-
var(--xh-tree-drop-fg, var(--xh-
|
|
667
|
+
var(--xh-tree-drop-fg, var(--xh-bg-brand));
|
|
496
668
|
}
|
|
497
669
|
|
|
498
670
|
/* 活动区域只说给读屏听,不占版面。声明与 shared/visually-hidden.ts 逐条同值。 */
|
|
@@ -513,5 +685,49 @@
|
|
|
513
685
|
[data-scope='tree'][data-part='item-indicator'] {
|
|
514
686
|
print-color-adjust: exact;
|
|
515
687
|
}
|
|
688
|
+
|
|
689
|
+
/* 转了一半的圈定格在纸上没有意义,停下 */
|
|
690
|
+
[data-scope='tree'][data-part='branch'][data-loading] > [data-scope='tree'][data-part='branch-control'] [data-scope='tree'][data-part='branch-trigger']:empty::before,
|
|
691
|
+
[data-scope='tree'][data-part='branch'][data-loading] > [data-scope='tree'][data-part='branch-control'] [data-scope='tree'][data-part='branch-indicator']:empty::before {
|
|
692
|
+
animation: none;
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
/* 强制色:连接线的横段是一块渐变底色、竖段是描边,系统色下一个被抹掉、一个被换成文字色;
|
|
697
|
+
两段都写 GrayText,并只让连接线不参与强制换色 */
|
|
698
|
+
@media (forced-colors: active) {
|
|
699
|
+
[data-scope='tree'][data-part='tree'][data-lines] [data-scope='tree'][data-part='branch-content'][data-orientation='vertical'] > [data-scope='tree'][data-part='item']::before,
|
|
700
|
+
[data-scope='tree'][data-part='tree'][data-lines] [data-scope='tree'][data-part='branch-content'][data-orientation='vertical'] > [data-scope='tree'][data-part='branch'] > [data-scope='tree'][data-part='branch-control']::before {
|
|
701
|
+
border-color: GrayText;
|
|
702
|
+
background-image: linear-gradient(GrayText, GrayText);
|
|
703
|
+
forced-color-adjust: none;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
[data-scope='tree'][data-part='tree'][data-lines] [data-scope='tree'][data-part='branch-content'][data-orientation='vertical'] > [data-scope='tree'][data-part='branch'] > [data-scope='tree'][data-part='branch-content']::after {
|
|
707
|
+
border-color: GrayText;
|
|
708
|
+
forced-color-adjust: none;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
@media (forced-colors: active) {
|
|
713
|
+
/* 兜底字形是 mask 挖出来的一块底色,这一档里底色被系统换成 Canvas,字形跟着消失。
|
|
714
|
+
字形退出强制换色、直接写系统色(不能取 currentColor:退出强制换色的伪元素读到的是被系统换掉之前的作者色):
|
|
715
|
+
条目面上取 CanvasText;按下与没被高亮时的悬停,家族把条目涂成 Highlight,字形换 HighlightText;
|
|
716
|
+
禁用取 GrayText */
|
|
717
|
+
[data-scope='tree']:is([data-part='branch-trigger'], [data-part='branch-indicator']):empty::before,
|
|
718
|
+
[data-scope='tree'][data-part='item-indicator']:empty::before {
|
|
719
|
+
forced-color-adjust: none;
|
|
720
|
+
background-color: CanvasText;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
[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,
|
|
724
|
+
[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 {
|
|
725
|
+
background-color: HighlightText;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
[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,
|
|
729
|
+
[data-scope='tree'][data-part='item']:is([aria-disabled='true'], [data-disabled]) [data-scope='tree'][data-part='item-indicator']:empty::before {
|
|
730
|
+
background-color: GrayText;
|
|
731
|
+
}
|
|
516
732
|
}
|
|
517
733
|
}
|
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
|
}
|