@xihan-ui/styles 1.0.0-alpha.1 → 1.0.0-alpha.3
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 +527 -0
- package/README.md +1 -1
- package/css/accordion.css +61 -5
- package/css/affix.css +5 -0
- package/css/alert.css +35 -5
- package/css/anchor.css +12 -7
- package/css/avatar-group.css +8 -3
- package/css/avatar.css +8 -3
- package/css/back-top.css +21 -1
- package/css/badge.css +21 -2
- package/css/breadcrumb.css +29 -4
- package/css/button-group.css +19 -13
- package/css/button.css +57 -11
- package/css/calendar.css +124 -2
- package/css/card.css +10 -5
- package/css/carousel.css +41 -5
- package/css/cascader.css +188 -102
- package/css/checkbox-group.css +46 -19
- package/css/checkbox.css +59 -8
- package/css/clipboard.css +7 -1
- package/css/code-block.css +17 -7
- package/css/collapsible.css +47 -2
- package/css/color-picker.css +117 -46
- package/css/combobox.css +132 -52
- package/css/composer.css +10 -3
- package/css/context-menu.css +101 -75
- package/css/countdown.css +5 -0
- package/css/date-field.css +96 -14
- package/css/date-picker.css +281 -65
- package/css/descriptions.css +7 -2
- package/css/dialog.css +109 -22
- package/css/download-trigger.css +76 -0
- package/css/drawer.css +75 -23
- package/css/dynamic-input.css +73 -17
- package/css/editable.css +17 -10
- package/css/ellipsis.css +6 -1
- package/css/empty-state.css +12 -7
- package/css/field.css +14 -6
- package/css/fieldset.css +69 -0
- package/css/file-upload.css +50 -7
- package/css/flex.css +5 -0
- package/css/float-button.css +21 -1
- package/css/floating-panel.css +310 -0
- package/css/form.css +10 -5
- package/css/gradient-text.css +5 -0
- package/css/grid.css +5 -0
- package/css/heatmap.css +410 -0
- package/css/highlight.css +6 -1
- package/css/hotkeys.css +90 -0
- package/css/hover-card.css +58 -50
- package/css/icon-wrapper.css +5 -0
- package/css/icon.css +5 -0
- package/css/image-cropper.css +231 -0
- package/css/image-viewer.css +167 -22
- package/css/image.css +7 -2
- package/css/infinite-scroll.css +6 -1
- package/css/json-viewer.css +241 -0
- package/css/layout.css +11 -10
- package/css/list.css +13 -8
- package/css/listbox.css +25 -4
- package/css/loading-bar.css +12 -1
- package/css/log.css +6 -1
- package/css/marquee.css +14 -0
- package/css/masonry.css +63 -0
- package/css/mention.css +105 -32
- package/css/menu.css +131 -46
- package/css/menubar.css +150 -66
- package/css/navigation-menu.css +59 -29
- package/css/number-animation.css +8 -3
- package/css/number-field.css +178 -16
- package/css/overlay-arrow.css +51 -0
- package/css/page-header.css +10 -5
- package/css/pagination.css +18 -13
- package/css/password-input.css +356 -0
- package/css/pin-input.css +18 -10
- package/css/popconfirm.css +73 -16
- package/css/popover.css +88 -44
- package/css/popselect.css +201 -52
- package/css/progress.css +52 -7
- package/css/qr-code.css +6 -1
- package/css/radio-group.css +19 -8
- package/css/rating.css +7 -2
- package/css/reset.css +17 -0
- package/css/result.css +11 -6
- package/css/scroll-area.css +65 -94
- package/css/scrollbar.css +167 -0
- package/css/segmented.css +215 -0
- package/css/select.css +292 -124
- package/css/separator.css +7 -2
- package/css/side-nav.css +116 -19
- package/css/signature-pad.css +144 -0
- package/css/skeleton.css +12 -1
- package/css/slider.css +15 -10
- package/css/space.css +117 -0
- package/css/spinner.css +31 -11
- package/css/splitter.css +5 -0
- package/css/statistic.css +14 -9
- package/css/steps.css +30 -8
- package/css/switch.css +62 -13
- package/css/table.css +136 -37
- package/css/tabs.css +9 -4
- package/css/tag.css +177 -0
- package/css/tags-input.css +83 -40
- package/css/text-field.css +154 -36
- package/css/thread.css +6 -1
- package/css/time-field.css +102 -16
- package/css/time-picker.css +264 -69
- package/css/time.css +5 -0
- package/css/timeline.css +15 -10
- package/css/timer.css +119 -0
- package/css/toast.css +46 -21
- package/css/toaster.css +6 -1
- package/css/toggle-group.css +5 -0
- package/css/toggle.css +11 -6
- package/css/tone.css +10 -5
- package/css/toolbar.css +6 -1
- package/css/tooltip.css +54 -38
- package/css/tour.css +128 -63
- package/css/transfer.css +73 -17
- package/css/tree-select.css +203 -83
- package/css/tree.css +90 -1
- package/css/typography.css +9 -4
- package/css/undefined.css +11 -1
- package/css/virtualizer.css +8 -1
- package/css/watermark.css +6 -2
- package/index.css +17 -1
- package/index.unlayered.css +9394 -2883
- package/package.json +19 -4
- package/css/motion.css +0 -58
package/css/tree-select.css
CHANGED
|
@@ -1,9 +1,59 @@
|
|
|
1
|
+
@layer xihan.motion {
|
|
2
|
+
/* 动画名的查找只认「文档里有没有这个名字」:引用别处文件里的名字,那份文件不一定在场,
|
|
3
|
+
动画会静默地整个不跑。每份皮肤都能单独引入,所以它用到的关键帧都写在自己身上。 */
|
|
4
|
+
@keyframes xh-pop-in {
|
|
5
|
+
from {
|
|
6
|
+
opacity: 0;
|
|
7
|
+
scale: var(--xh-motion-scale-enter);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
to {
|
|
11
|
+
opacity: 1;
|
|
12
|
+
scale: 1;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
@keyframes xh-pop-out {
|
|
16
|
+
from {
|
|
17
|
+
opacity: 1;
|
|
18
|
+
scale: 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
to {
|
|
22
|
+
opacity: 0;
|
|
23
|
+
scale: var(--xh-motion-scale-enter);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
1
28
|
@layer xihan.components {
|
|
2
|
-
/*
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
29
|
+
/* 皮肤在场的标记:开发模式下按 scope 探一次,取不到就说明这份皮肤没被引入。 */
|
|
30
|
+
[data-scope='tree-select'] {
|
|
31
|
+
--xh-tree-select-skin: 1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* 坐标由定位引擎写进 style(inset-inline-start / inset-block-start),这里只定位模式与层级 */
|
|
35
|
+
[data-scope='tree-select'][data-part='positioner'] {
|
|
36
|
+
/* 落定那一侧的可用高度,由定位引擎经内联自定义属性写进来,内容层继承它限高;
|
|
37
|
+
引擎没算(尚未落位 / 无引擎)时不额外限高 */
|
|
38
|
+
--xh-_tree-select-available-h: 100vh;
|
|
39
|
+
|
|
40
|
+
position: fixed;
|
|
41
|
+
z-index: var(--xh-tree-select-layer, var(--xh-layer-popover));
|
|
42
|
+
/* 空壳不吃指针,交互只发生在 content 里 */
|
|
43
|
+
pointer-events: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* 锚点被滚出可视区:整个浮层随之收起 */
|
|
47
|
+
[data-scope='tree-select'][data-part='positioner'][data-hidden] {
|
|
48
|
+
visibility: hidden;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* 私有槽同时声明在根与 positioner 上:浮层被搬到 portal 落点,不是根的后代,继承不过去 */
|
|
52
|
+
[data-scope='tree-select']:is([data-part='root'], [data-part='positioner']) {
|
|
53
|
+
/* 作者塞进指示符槽的图标跟着尺寸档走,与皮肤画的兜底字形同一把尺 */
|
|
54
|
+
--xh-icon-size: var(--xh-tree-select-icon-size, var(--xh-glyph-size-md));
|
|
55
|
+
|
|
56
|
+
/* 尺寸档只换这几个私有槽,盒与树里的行都从这两处继承它们,换档不必给每个部件各写一条选择器 */
|
|
7
57
|
--xh-_tree-select-h: var(--xh-control-h-md);
|
|
8
58
|
--xh-_tree-select-px: var(--xh-control-px-md);
|
|
9
59
|
--xh-_tree-select-gap: var(--xh-control-gap-md);
|
|
@@ -19,9 +69,14 @@
|
|
|
19
69
|
/* 选中行的文字色随语气走,没写 data-tone 时退回品牌强调色 */
|
|
20
70
|
--xh-_tree-select-selected-fg: var(--xh-_tone-fg, var(--xh-fg-brand-strong));
|
|
21
71
|
|
|
72
|
+
/* 聚焦环恒用固定环色;校验失败时换成告警环色 */
|
|
73
|
+
--xh-_tree-select-ring: var(--xh-ring-focus);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* 标签一行、盒一行的两行堆叠 */
|
|
77
|
+
[data-scope='tree-select'][data-part='root'] {
|
|
22
78
|
display: inline-flex;
|
|
23
|
-
flex-
|
|
24
|
-
align-items: center;
|
|
79
|
+
flex-direction: column;
|
|
25
80
|
gap: var(--xh-tree-select-gap, var(--xh-space-1));
|
|
26
81
|
}
|
|
27
82
|
|
|
@@ -33,48 +88,48 @@
|
|
|
33
88
|
/* —— 形态 —— */
|
|
34
89
|
/* 形态只决定描边与底色怎么用;用哪族颜色由 data-tone 决定,没写 tone 就沿用原来的中性配色 */
|
|
35
90
|
/* outline 就是缺省那一身:描边加画布底,写出来只为让三档并列可读 */
|
|
36
|
-
[data-scope='tree-select'][data-part='root'][data-variant='outline'] {
|
|
91
|
+
[data-scope='tree-select']:is([data-part='root'], [data-part='positioner'])[data-variant='outline'] {
|
|
37
92
|
--xh-_tree-select-border: var(--xh-border-control);
|
|
38
93
|
--xh-_tree-select-border-hover: var(--xh-border-control-hover);
|
|
39
94
|
--xh-_tree-select-bg: var(--xh-bg-canvas);
|
|
40
95
|
}
|
|
41
96
|
|
|
42
97
|
/* subtle 是填充式:底色接过「这里能点」的表达,描边随之让位 */
|
|
43
|
-
[data-scope='tree-select'][data-part='root'][data-variant='subtle'] {
|
|
98
|
+
[data-scope='tree-select']:is([data-part='root'], [data-part='positioner'])[data-variant='subtle'] {
|
|
44
99
|
--xh-_tree-select-border: transparent;
|
|
45
100
|
--xh-_tree-select-border-hover: var(--xh-_tone-border, var(--xh-border-control-hover));
|
|
46
101
|
--xh-_tree-select-bg: var(--xh-_tone-subtle, var(--xh-bg-subtle));
|
|
47
102
|
}
|
|
48
103
|
|
|
49
|
-
/*
|
|
50
|
-
[data-scope='tree-select'][data-part='root'][data-variant='ghost'] {
|
|
104
|
+
/* 无框:底与常态描边透明,悬停浮出描边,聚焦由焦点环表达 */
|
|
105
|
+
[data-scope='tree-select']:is([data-part='root'], [data-part='positioner'])[data-variant='ghost'] {
|
|
51
106
|
--xh-_tree-select-border: transparent;
|
|
52
|
-
--xh-_tree-select-border-hover:
|
|
107
|
+
--xh-_tree-select-border-hover: var(--xh-_tone-border, var(--xh-border-control-hover));
|
|
53
108
|
--xh-_tree-select-bg: transparent;
|
|
54
109
|
}
|
|
55
110
|
|
|
56
111
|
/* —— 尺寸 —— */
|
|
57
112
|
/* 缺省档写在上面的基础规则里 */
|
|
58
|
-
[data-scope='tree-select'][data-part='root'][data-size='sm'] {
|
|
113
|
+
[data-scope='tree-select']:is([data-part='root'], [data-part='positioner'])[data-size='sm'] {
|
|
114
|
+
--xh-icon-size: var(--xh-tree-select-icon-size, var(--xh-glyph-size-sm));
|
|
59
115
|
--xh-_tree-select-h: var(--xh-control-h-sm);
|
|
60
116
|
--xh-_tree-select-px: var(--xh-control-px-sm);
|
|
61
117
|
--xh-_tree-select-gap: var(--xh-control-gap-sm);
|
|
62
|
-
--xh-_tree-select-font-size: var(--xh-font-
|
|
63
|
-
--xh-_tree-select-label-font-size: var(--xh-font-
|
|
118
|
+
--xh-_tree-select-font-size: var(--xh-control-font-sm);
|
|
119
|
+
--xh-_tree-select-label-font-size: var(--xh-control-font-sm);
|
|
64
120
|
}
|
|
65
121
|
|
|
66
|
-
[data-scope='tree-select'][data-part='root'][data-size='lg'] {
|
|
122
|
+
[data-scope='tree-select']:is([data-part='root'], [data-part='positioner'])[data-size='lg'] {
|
|
123
|
+
--xh-icon-size: var(--xh-tree-select-icon-size, var(--xh-glyph-size-lg));
|
|
67
124
|
--xh-_tree-select-h: var(--xh-control-h-lg);
|
|
68
125
|
--xh-_tree-select-px: var(--xh-control-px-lg);
|
|
69
126
|
--xh-_tree-select-gap: var(--xh-control-gap-lg);
|
|
70
|
-
--xh-_tree-select-font-size: var(--xh-font-
|
|
71
|
-
--xh-_tree-select-label-font-size: var(--xh-font-
|
|
127
|
+
--xh-_tree-select-font-size: var(--xh-control-font-lg);
|
|
128
|
+
--xh-_tree-select-label-font-size: var(--xh-control-font-lg);
|
|
72
129
|
}
|
|
73
130
|
|
|
74
131
|
[data-scope='tree-select'][data-part='label'] {
|
|
75
|
-
|
|
76
|
-
flex-basis: 100%;
|
|
77
|
-
color: var(--xh-tree-select-label-fg, var(--xh-fg-muted));
|
|
132
|
+
color: var(--xh-tree-select-label-fg, var(--xh-fg-default));
|
|
78
133
|
font-size: var(--xh-tree-select-label-font-size, var(--xh-_tree-select-label-font-size));
|
|
79
134
|
font-weight: var(--xh-tree-select-label-font-weight, var(--xh-text-label-weight));
|
|
80
135
|
line-height: var(--xh-leading-none);
|
|
@@ -85,63 +140,88 @@
|
|
|
85
140
|
color: var(--xh-fg-subtle);
|
|
86
141
|
}
|
|
87
142
|
|
|
88
|
-
/*
|
|
89
|
-
|
|
90
|
-
[data-scope='tree-select'][data-part='trigger'] {
|
|
143
|
+
/* 盒:描边、底色、控件高度与行内内衬都落在这一层,触发按钮与清空按钮在里面并排 */
|
|
144
|
+
[data-scope='tree-select'][data-part='control'] {
|
|
91
145
|
display: inline-flex;
|
|
92
|
-
flex: 1;
|
|
93
146
|
align-items: center;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
border: var(--xh-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
color: var(--xh-tree-select-trigger-fg, var(--xh-fg-default));
|
|
103
|
-
font-family: inherit;
|
|
104
|
-
font-size: var(--xh-tree-select-trigger-font-size, var(--xh-_tree-select-font-size));
|
|
105
|
-
line-height: var(--xh-leading-none);
|
|
106
|
-
text-align: start;
|
|
147
|
+
gap: var(--xh-tree-select-control-gap, var(--xh-_tree-select-gap));
|
|
148
|
+
min-inline-size: var(--xh-tree-select-control-min-w, var(--xh-control-min-w));
|
|
149
|
+
block-size: var(--xh-tree-select-control-h, var(--xh-_tree-select-h));
|
|
150
|
+
padding-inline: var(--xh-tree-select-control-px, var(--xh-_tree-select-px));
|
|
151
|
+
border: var(--xh-stroke-thin) solid var(--xh-tree-select-control-border, var(--xh-_tree-select-border));
|
|
152
|
+
border-radius: var(--xh-tree-select-control-radius, var(--xh-shape-control));
|
|
153
|
+
background: var(--xh-tree-select-control-bg, var(--xh-_tree-select-bg));
|
|
154
|
+
color: var(--xh-tree-select-control-fg, var(--xh-fg-default));
|
|
107
155
|
cursor: pointer;
|
|
108
156
|
transition: border-color var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
|
|
109
157
|
}
|
|
110
158
|
|
|
111
|
-
[data-scope='tree-select'][data-part='
|
|
159
|
+
[data-scope='tree-select'][data-part='control'][hidden] {
|
|
112
160
|
display: none;
|
|
113
161
|
}
|
|
114
162
|
|
|
115
163
|
/* hover 只在中性态换描边:invalid 正拿边框颜色说事,被 hover 盖掉那条信息就没了 */
|
|
116
|
-
[data-scope='tree-select'][data-part='
|
|
117
|
-
border-color: var(--xh-tree-select-
|
|
164
|
+
[data-scope='tree-select'][data-part='control']:hover:not([data-disabled], [data-invalid]) {
|
|
165
|
+
border-color: var(--xh-tree-select-control-border-hover, var(--xh-_tree-select-border-hover));
|
|
118
166
|
}
|
|
119
167
|
|
|
120
|
-
/*
|
|
121
|
-
[data-scope='tree-select'][data-part='
|
|
122
|
-
|
|
168
|
+
/* Tab 停靠点是盒里的 trigger(展开后才移进树里),环画在盒上 */
|
|
169
|
+
[data-scope='tree-select'][data-part='control']:focus-within:not([data-disabled]) {
|
|
170
|
+
border-color: var(--xh-tree-select-control-border-focus, var(--xh-_tone, var(--xh-border-control-focus)));
|
|
171
|
+
outline: var(--xh-ring-width) solid var(--xh-_tree-select-ring);
|
|
123
172
|
outline-offset: var(--xh-ring-offset);
|
|
124
173
|
}
|
|
125
174
|
|
|
126
|
-
[data-scope='tree-select'][data-part='
|
|
127
|
-
border-color: var(--xh-tree-select-
|
|
175
|
+
[data-scope='tree-select'][data-part='control'][data-invalid] {
|
|
176
|
+
border-color: var(--xh-tree-select-control-border-invalid, var(--xh-border-invalid));
|
|
177
|
+
|
|
178
|
+
/* 校验失败时环也跟着变红:两圈等宽相邻却一红一蓝,读的人不知道哪个才是当前状态 */
|
|
179
|
+
--xh-_tree-select-ring: var(--xh-ring-invalid);
|
|
128
180
|
}
|
|
129
181
|
|
|
130
182
|
/* 只读仍可聚焦、浮层仍展得开、树仍能浏览,所以不置灰,只把底色压下去表示「改不动」 */
|
|
131
|
-
[data-scope='tree-select'][data-part='
|
|
132
|
-
background: var(--xh-tree-select-
|
|
183
|
+
[data-scope='tree-select'][data-part='control'][data-readonly] {
|
|
184
|
+
background: var(--xh-tree-select-control-bg-readonly, var(--xh-bg-subtle));
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
[data-scope='tree-select'][data-part='control'][data-disabled] {
|
|
188
|
+
background: var(--xh-tree-select-control-bg-disabled, var(--xh-bg-subtle));
|
|
189
|
+
color: var(--xh-fg-disabled);
|
|
190
|
+
cursor: not-allowed;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* 盒内那颗可聚焦的按钮:不画描边不铺底也不自带高度,只占满剩余宽度、排布回显与箭头 */
|
|
194
|
+
[data-scope='tree-select'][data-part='trigger'] {
|
|
195
|
+
display: inline-flex;
|
|
196
|
+
flex: 1 1 auto;
|
|
197
|
+
align-items: center;
|
|
198
|
+
justify-content: space-between;
|
|
199
|
+
gap: var(--xh-tree-select-trigger-gap, var(--xh-_tree-select-gap));
|
|
200
|
+
min-inline-size: 0;
|
|
201
|
+
padding: 0;
|
|
202
|
+
border: 0;
|
|
203
|
+
background: transparent;
|
|
204
|
+
color: var(--xh-tree-select-trigger-fg, var(--xh-fg-default));
|
|
205
|
+
font-family: inherit;
|
|
206
|
+
font-size: var(--xh-tree-select-trigger-font-size, var(--xh-_tree-select-font-size));
|
|
207
|
+
line-height: var(--xh-leading-none);
|
|
208
|
+
text-align: start;
|
|
209
|
+
cursor: pointer;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
[data-scope='tree-select'][data-part='trigger'][hidden] {
|
|
213
|
+
display: none;
|
|
133
214
|
}
|
|
134
215
|
|
|
135
216
|
/* trigger 是单体控件,用原生 disabled(树里的集合条目一律 aria-disabled,写 :disabled 永不命中) */
|
|
136
217
|
[data-scope='tree-select'][data-part='trigger']:disabled {
|
|
137
|
-
background: var(--xh-tree-select-trigger-bg-disabled, var(--xh-bg-subtle));
|
|
138
218
|
color: var(--xh-fg-disabled);
|
|
139
219
|
cursor: not-allowed;
|
|
140
220
|
}
|
|
141
221
|
|
|
142
|
-
/*
|
|
222
|
+
/* 多选时值会连成很长一串,必须能截断;框宽由盒定,这里得允许自己被压缩 */
|
|
143
223
|
[data-scope='tree-select'][data-part='value-text'] {
|
|
144
|
-
flex: 1;
|
|
224
|
+
flex: 1 1 auto;
|
|
145
225
|
min-inline-size: 0;
|
|
146
226
|
overflow: hidden;
|
|
147
227
|
/* 行高留出文字的上下伸展空间,本行那层 overflow:hidden 才不会把字削掉;
|
|
@@ -160,6 +240,12 @@
|
|
|
160
240
|
color: var(--xh-fg-disabled);
|
|
161
241
|
}
|
|
162
242
|
|
|
243
|
+
/* 有值时清空钮顶上来,箭头让位:两个图标并排堆着,用户分不清点哪个。
|
|
244
|
+
让位而不是禁用——禁用的图标还占着位置,看着像坏了 */
|
|
245
|
+
[data-scope='tree-select'][data-part='indicator'][data-clearable] {
|
|
246
|
+
display: none;
|
|
247
|
+
}
|
|
248
|
+
|
|
163
249
|
[data-scope='tree-select'][data-part='indicator'] {
|
|
164
250
|
display: inline-flex;
|
|
165
251
|
flex: none;
|
|
@@ -181,7 +267,7 @@
|
|
|
181
267
|
color: var(--xh-fg-disabled);
|
|
182
268
|
}
|
|
183
269
|
|
|
184
|
-
/*
|
|
270
|
+
/* 盒内靠右的小方钮,不撑高那一行 */
|
|
185
271
|
[data-scope='tree-select'][data-part='clear-trigger'] {
|
|
186
272
|
display: inline-flex;
|
|
187
273
|
flex: none;
|
|
@@ -195,24 +281,25 @@
|
|
|
195
281
|
background: var(--xh-tree-select-action-bg, transparent);
|
|
196
282
|
color: var(--xh-tree-select-action-fg, var(--xh-fg-muted));
|
|
197
283
|
font-family: inherit;
|
|
198
|
-
font-size: var(--xh-tree-select-action-font-size, var(--xh-
|
|
284
|
+
font-size: var(--xh-tree-select-action-font-size, var(--xh-text-secondary-size));
|
|
199
285
|
line-height: var(--xh-leading-none);
|
|
200
286
|
cursor: pointer;
|
|
201
287
|
user-select: none;
|
|
202
|
-
transition: background var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
|
|
288
|
+
transition: background var(--xh-motion-duration-micro) var(--xh-motion-ease-enter), scale var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
|
|
203
289
|
}
|
|
204
290
|
|
|
205
291
|
[data-scope='tree-select'][data-part='clear-trigger'][hidden] {
|
|
206
292
|
display: none;
|
|
207
293
|
}
|
|
208
294
|
|
|
209
|
-
[data-scope='tree-select'][data-part='clear-trigger']:hover
|
|
295
|
+
[data-scope='tree-select'][data-part='clear-trigger']:hover {
|
|
210
296
|
background: var(--xh-tree-select-action-bg-hover, var(--xh-bg-subtle-hover));
|
|
211
297
|
color: var(--xh-tree-select-action-fg-hover, var(--xh-fg-default));
|
|
212
298
|
}
|
|
213
299
|
|
|
214
|
-
[data-scope='tree-select'][data-part='clear-trigger']:active
|
|
300
|
+
[data-scope='tree-select'][data-part='clear-trigger']:active {
|
|
215
301
|
background: var(--xh-tree-select-action-bg-active, var(--xh-bg-subtle-active));
|
|
302
|
+
scale: var(--xh-motion-scale-press);
|
|
216
303
|
}
|
|
217
304
|
|
|
218
305
|
/* 清空按钮退出了 Tab 序列(tabindex=-1),正常操作走不到这里;
|
|
@@ -222,48 +309,29 @@
|
|
|
222
309
|
outline-offset: var(--xh-ring-offset);
|
|
223
310
|
}
|
|
224
311
|
|
|
225
|
-
/* 无选中、只读、整控件禁用三种情况下都按不动,用的是原生 disabled */
|
|
226
|
-
[data-scope='tree-select'][data-part='clear-trigger']:disabled {
|
|
227
|
-
background: var(--xh-tree-select-action-bg, transparent);
|
|
228
|
-
color: var(--xh-fg-disabled);
|
|
229
|
-
cursor: not-allowed;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
/* 坐标由定位引擎写进 style(inset-inline-start / inset-block-start),这里只定位模式与层级 */
|
|
233
|
-
[data-scope='tree-select'][data-part='positioner'] {
|
|
234
|
-
position: fixed;
|
|
235
|
-
z-index: var(--xh-layer-popover);
|
|
236
|
-
/* 空壳不吃指针,交互只发生在 content 里 */
|
|
237
|
-
pointer-events: none;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
/* 锚点被滚出可视区:整个浮层随之收起 */
|
|
241
|
-
[data-scope='tree-select'][data-part='positioner'][data-hidden] {
|
|
242
|
-
visibility: hidden;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
312
|
[data-scope='tree-select'][data-part='content'] {
|
|
246
313
|
display: flex;
|
|
247
314
|
flex-direction: column;
|
|
248
315
|
min-inline-size: var(--xh-tree-select-content-min-w, var(--xh-overlay-min-w));
|
|
249
316
|
max-inline-size: var(--xh-tree-select-content-max-w, var(--xh-overlay-max-w));
|
|
250
|
-
max-block-size: var(--xh-tree-select-content-max-h, var(--xh-overlay-max-h));
|
|
317
|
+
max-block-size: min(var(--xh-tree-select-content-max-h, var(--xh-overlay-max-h)), var(--xh-_tree-select-available-h));
|
|
251
318
|
padding-block: var(--xh-tree-select-content-py, var(--xh-space-1));
|
|
252
319
|
padding-inline: var(--xh-tree-select-content-px, var(--xh-space-1));
|
|
253
320
|
border: var(--xh-stroke-thin) solid var(--xh-tree-select-content-border, var(--xh-border-default));
|
|
254
321
|
border-radius: var(--xh-tree-select-content-radius, var(--xh-shape-surface));
|
|
255
322
|
background: var(--xh-tree-select-content-bg, var(--xh-bg-surface));
|
|
256
323
|
color: var(--xh-tree-select-content-fg, var(--xh-fg-default));
|
|
257
|
-
box-shadow: var(--xh-tree-select-content-shadow, var(--xh-elevation-
|
|
324
|
+
box-shadow: var(--xh-tree-select-content-shadow, var(--xh-elevation-floating));
|
|
258
325
|
/* 两轴一起给:深层节点靠缩进往行末推,横向溢出是常态,得够得着 */
|
|
259
326
|
overflow: auto;
|
|
260
327
|
pointer-events: auto;
|
|
261
328
|
}
|
|
262
329
|
|
|
263
|
-
/*
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
330
|
+
/* 这里刻意没有 [data-part='content'][hidden] { display: none },与 dialog 一致:
|
|
331
|
+
收起态连接层会给 content 打 hidden,而上面那条 display 正是要盖掉 UA 的
|
|
332
|
+
[hidden]{display:none}——退场动画得先能播。presence 读的是 content 的 animationName,
|
|
333
|
+
真正的收起由宿主在退场结束后落成内联 display:none(Vue 那边直接不渲染)。
|
|
334
|
+
其余声明了 display 的角色节点仍补 [hidden],那几处没有退场动画。 */
|
|
267
335
|
|
|
268
336
|
/* 容器只是焦点域的兜底落点,落焦不画环:高亮永远长在行上 */
|
|
269
337
|
[data-scope='tree-select'][data-part='content']:focus-visible {
|
|
@@ -271,7 +339,13 @@
|
|
|
271
339
|
}
|
|
272
340
|
|
|
273
341
|
[data-scope='tree-select'][data-part='content'][data-state='open'] {
|
|
274
|
-
animation: xh-
|
|
342
|
+
animation: xh-pop-in var(--xh-motion-duration-enter) var(--xh-motion-ease-enter);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/* 退场:收起那一帧 hidden 由退场闸门押后,这里才播得出来。forwards 把末态钉住,
|
|
346
|
+
免得动画结束到真收起之间闪一下原样 */
|
|
347
|
+
[data-scope='tree-select'][data-part='content'][data-state='closed'] {
|
|
348
|
+
animation: xh-pop-out var(--xh-motion-duration-exit) var(--xh-motion-ease-exit) forwards;
|
|
275
349
|
}
|
|
276
350
|
|
|
277
351
|
/* 边框、底色与滚动都归 content,树本身只把行竖着排开 */
|
|
@@ -446,4 +520,50 @@
|
|
|
446
520
|
[data-scope='tree-select'][data-part='branch-content'][hidden] {
|
|
447
521
|
display: none;
|
|
448
522
|
}
|
|
523
|
+
|
|
524
|
+
/* 没写内容就由皮肤画兜底字形;作者往部件里塞了自己的图形,这几条即不命中 */
|
|
525
|
+
[data-scope='tree-select'][data-part='indicator']:empty::before {
|
|
526
|
+
content: '';
|
|
527
|
+
display: inline-block;
|
|
528
|
+
inline-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
529
|
+
block-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
530
|
+
vertical-align: var(--xh-glyph-baseline-shift);
|
|
531
|
+
background-color: currentColor;
|
|
532
|
+
-webkit-mask: var(--xh-glyph-mark-chevron-down) center / contain no-repeat;
|
|
533
|
+
mask: var(--xh-glyph-mark-chevron-down) center / contain no-repeat;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
[data-scope='tree-select'][data-part='item-indicator']:empty::before {
|
|
537
|
+
content: '';
|
|
538
|
+
display: inline-block;
|
|
539
|
+
inline-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
540
|
+
block-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
541
|
+
vertical-align: var(--xh-glyph-baseline-shift);
|
|
542
|
+
background-color: currentColor;
|
|
543
|
+
-webkit-mask: var(--xh-glyph-mark-check) center / contain no-repeat;
|
|
544
|
+
mask: var(--xh-glyph-mark-check) center / contain no-repeat;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
[data-scope='tree-select'][data-part='branch-trigger']:empty::before,
|
|
548
|
+
[data-scope='tree-select'][data-part='branch-indicator']:empty::before {
|
|
549
|
+
content: '';
|
|
550
|
+
display: inline-block;
|
|
551
|
+
inline-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
552
|
+
block-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
553
|
+
vertical-align: var(--xh-glyph-baseline-shift);
|
|
554
|
+
background-color: currentColor;
|
|
555
|
+
-webkit-mask: var(--xh-glyph-mark-chevron-right) center / contain no-repeat;
|
|
556
|
+
mask: var(--xh-glyph-mark-chevron-right) center / contain no-repeat;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
[data-scope='tree-select'][data-part='clear-trigger']:empty::before {
|
|
560
|
+
content: '';
|
|
561
|
+
display: inline-block;
|
|
562
|
+
inline-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
563
|
+
block-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
564
|
+
vertical-align: var(--xh-glyph-baseline-shift);
|
|
565
|
+
background-color: currentColor;
|
|
566
|
+
-webkit-mask: var(--xh-glyph-mark-close) center / contain no-repeat;
|
|
567
|
+
mask: var(--xh-glyph-mark-close) center / contain no-repeat;
|
|
568
|
+
}
|
|
449
569
|
}
|
package/css/tree.css
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
@layer xihan.components {
|
|
2
|
+
/* 皮肤在场的标记:开发模式下按 scope 探一次,取不到就说明这份皮肤没被引入。 */
|
|
3
|
+
[data-scope='tree'] {
|
|
4
|
+
--xh-tree-skin: 1;
|
|
5
|
+
}
|
|
6
|
+
|
|
2
7
|
[data-scope='tree'][data-part='root'] {
|
|
8
|
+
/* 作者塞进指示符槽的图标跟着字号走,与皮肤画的兜底字形同一把尺 */
|
|
9
|
+
--xh-icon-size: var(--xh-tree-icon-size, var(--xh-glyph-size-text));
|
|
10
|
+
|
|
3
11
|
display: flex;
|
|
4
12
|
flex-direction: column;
|
|
5
13
|
gap: var(--xh-tree-gap, var(--xh-space-2));
|
|
@@ -25,7 +33,7 @@
|
|
|
25
33
|
[data-scope='tree'][data-part='tree'] {
|
|
26
34
|
display: flex;
|
|
27
35
|
flex-direction: column;
|
|
28
|
-
max-block-size: var(--xh-tree-max-h,
|
|
36
|
+
max-block-size: var(--xh-tree-max-h, var(--xh-viewport-h-lg));
|
|
29
37
|
padding-block: var(--xh-tree-py, var(--xh-space-1));
|
|
30
38
|
padding-inline: var(--xh-tree-px, var(--xh-space-1));
|
|
31
39
|
border: var(--xh-stroke-thin) solid var(--xh-tree-border, var(--xh-border-default));
|
|
@@ -97,6 +105,63 @@
|
|
|
97
105
|
background: var(--xh-tree-row-bg-hover, var(--xh-bg-subtle));
|
|
98
106
|
}
|
|
99
107
|
|
|
108
|
+
/* 勾选把手:勾选态只画在它身上,不碰行底色——底色那条通道归高亮 */
|
|
109
|
+
[data-scope='tree'][data-part='item-checkbox'],
|
|
110
|
+
[data-scope='tree'][data-part='branch-checkbox'] {
|
|
111
|
+
display: inline-grid;
|
|
112
|
+
place-items: center;
|
|
113
|
+
flex: none;
|
|
114
|
+
inline-size: var(--xh-tree-checkbox-size, var(--xh-control-indicator-size));
|
|
115
|
+
block-size: var(--xh-tree-checkbox-size, var(--xh-control-indicator-size));
|
|
116
|
+
border: var(--xh-stroke-thin) solid var(--xh-tree-checkbox-border, var(--xh-border-control));
|
|
117
|
+
border-radius: var(--xh-tree-checkbox-radius, var(--xh-shape-inset));
|
|
118
|
+
background: var(--xh-tree-checkbox-bg, var(--xh-bg-canvas));
|
|
119
|
+
color: var(--xh-tree-checkbox-fg, var(--xh-fg-on-brand));
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
[data-scope='tree'][data-part='item-checkbox'][data-selected],
|
|
123
|
+
[data-scope='tree'][data-part='branch-checkbox'][data-selected] {
|
|
124
|
+
border-color: var(--xh-tree-checkbox-border-checked, var(--xh-bg-brand));
|
|
125
|
+
background: var(--xh-tree-checkbox-bg-checked, var(--xh-bg-brand));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* 半选:级联勾选下「子树勾了一部分」的第三态,此前发了 data-indeterminate 却没人画 */
|
|
129
|
+
[data-scope='tree'][data-part='item-checkbox'][data-indeterminate]:not([data-selected]),
|
|
130
|
+
[data-scope='tree'][data-part='branch-checkbox'][data-indeterminate]:not([data-selected]) {
|
|
131
|
+
border-color: var(--xh-tree-checkbox-border-checked, var(--xh-bg-brand));
|
|
132
|
+
background: var(--xh-tree-checkbox-bg-checked, var(--xh-bg-brand));
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* 没写内容就由皮肤画;作者往把手里塞了自己的图形,这条规则即不命中 */
|
|
136
|
+
[data-scope='tree'][data-part='item-checkbox'][data-selected]:empty::before,
|
|
137
|
+
[data-scope='tree'][data-part='branch-checkbox'][data-selected]:empty::before {
|
|
138
|
+
content: '';
|
|
139
|
+
display: inline-block;
|
|
140
|
+
inline-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
141
|
+
block-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
142
|
+
vertical-align: var(--xh-glyph-baseline-shift);
|
|
143
|
+
background-color: currentColor;
|
|
144
|
+
-webkit-mask: var(--xh-glyph-mark-check) center / contain no-repeat;
|
|
145
|
+
mask: var(--xh-glyph-mark-check) center / contain no-repeat;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
[data-scope='tree'][data-part='item-checkbox'][data-indeterminate]:not([data-selected]):empty::before,
|
|
149
|
+
[data-scope='tree'][data-part='branch-checkbox'][data-indeterminate]:not([data-selected]):empty::before {
|
|
150
|
+
content: '';
|
|
151
|
+
display: inline-block;
|
|
152
|
+
inline-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
153
|
+
block-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
154
|
+
vertical-align: var(--xh-glyph-baseline-shift);
|
|
155
|
+
background-color: currentColor;
|
|
156
|
+
-webkit-mask: var(--xh-glyph-mark-minus) center / contain no-repeat;
|
|
157
|
+
mask: var(--xh-glyph-mark-minus) center / contain no-repeat;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
[data-scope='tree'][data-part='item-checkbox'][data-disabled],
|
|
161
|
+
[data-scope='tree'][data-part='branch-checkbox'][data-disabled] {
|
|
162
|
+
border-color: var(--xh-tree-checkbox-border-disabled, var(--xh-border-subtle));
|
|
163
|
+
}
|
|
164
|
+
|
|
100
165
|
/* 选中只换文字色与字重,配合行尾的 ✓ 标记;底色整条通道留给高亮,
|
|
101
166
|
两者因此能同时看见 */
|
|
102
167
|
[data-scope='tree'][data-part='item'][data-selected],
|
|
@@ -204,4 +269,28 @@
|
|
|
204
269
|
[data-scope='tree'][data-part='branch-content'][hidden] {
|
|
205
270
|
display: none;
|
|
206
271
|
}
|
|
272
|
+
|
|
273
|
+
/* 没写内容就由皮肤画兜底字形;作者往部件里塞了自己的图形,这几条即不命中 */
|
|
274
|
+
[data-scope='tree'][data-part='branch-trigger']:empty::before,
|
|
275
|
+
[data-scope='tree'][data-part='branch-indicator']:empty::before {
|
|
276
|
+
content: '';
|
|
277
|
+
display: inline-block;
|
|
278
|
+
inline-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
279
|
+
block-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
280
|
+
vertical-align: var(--xh-glyph-baseline-shift);
|
|
281
|
+
background-color: currentColor;
|
|
282
|
+
-webkit-mask: var(--xh-glyph-mark-chevron-right) center / contain no-repeat;
|
|
283
|
+
mask: var(--xh-glyph-mark-chevron-right) center / contain no-repeat;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
[data-scope='tree'][data-part='item-indicator']:empty::before {
|
|
287
|
+
content: '';
|
|
288
|
+
display: inline-block;
|
|
289
|
+
inline-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
290
|
+
block-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
291
|
+
vertical-align: var(--xh-glyph-baseline-shift);
|
|
292
|
+
background-color: currentColor;
|
|
293
|
+
-webkit-mask: var(--xh-glyph-mark-check) center / contain no-repeat;
|
|
294
|
+
mask: var(--xh-glyph-mark-check) center / contain no-repeat;
|
|
295
|
+
}
|
|
207
296
|
}
|
package/css/typography.css
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
@layer xihan.components {
|
|
2
|
+
/* 皮肤在场的标记:开发模式下按 scope 探一次,取不到就说明这份皮肤没被引入。 */
|
|
3
|
+
[data-scope='typography'] {
|
|
4
|
+
--xh-typography-skin: 1;
|
|
5
|
+
}
|
|
6
|
+
|
|
2
7
|
[data-scope='typography'][data-part='root'] {
|
|
3
8
|
/* 尺寸档只换这几个私有槽,各段从根上继承它们,换档不必给每个部件各写一条选择器 */
|
|
4
9
|
--xh-_typography-body-size: var(--xh-text-body-size);
|
|
@@ -12,8 +17,8 @@
|
|
|
12
17
|
--xh-_typography-h6: var(--xh-font-size-sm);
|
|
13
18
|
/* 读行宽度:整块正文不收窄就会拉成一行行难读的长句 */
|
|
14
19
|
--xh-_typography-measure: 68ch;
|
|
15
|
-
/*
|
|
16
|
-
--xh-_typography-code-size: 0.
|
|
20
|
+
/* 行内代码跟着所在那行的字号缩:以「随文字走」的字形尺寸为基数按比例收一点,不取固定档位 */
|
|
21
|
+
--xh-_typography-code-size: calc(var(--xh-glyph-size-text) * 0.9);
|
|
17
22
|
|
|
18
23
|
/* 建块级格式化上下文,段落的外边距不越过根往外塌 */
|
|
19
24
|
display: flow-root;
|
|
@@ -118,7 +123,7 @@
|
|
|
118
123
|
[data-scope='typography'][data-part='text'][data-variant='code'] {
|
|
119
124
|
padding-block: var(--xh-typography-code-py, var(--xh-space-0_5));
|
|
120
125
|
padding-inline: var(--xh-typography-code-px, var(--xh-space-1));
|
|
121
|
-
border-radius: var(--xh-typography-code-radius, var(--xh-
|
|
126
|
+
border-radius: var(--xh-typography-code-radius, var(--xh-shape-inset));
|
|
122
127
|
background: var(--xh-typography-code-bg, var(--xh-bg-subtle));
|
|
123
128
|
font-family: var(--xh-font-family-mono);
|
|
124
129
|
font-size: var(--xh-typography-code-font-size, var(--xh-_typography-code-size));
|
|
@@ -131,7 +136,7 @@
|
|
|
131
136
|
|
|
132
137
|
/* —— 行内链接 —— */
|
|
133
138
|
[data-scope='typography'][data-part='link'] {
|
|
134
|
-
border-radius: var(--xh-typography-link-radius, var(--xh-
|
|
139
|
+
border-radius: var(--xh-typography-link-radius, var(--xh-shape-inset));
|
|
135
140
|
color: var(--xh-typography-link-fg, var(--xh-fg-brand));
|
|
136
141
|
text-decoration: underline;
|
|
137
142
|
text-underline-offset: var(--xh-typography-link-underline-offset, var(--xh-space-0_5));
|
package/css/undefined.css
CHANGED
|
@@ -2,26 +2,36 @@
|
|
|
2
2
|
* 元素升级前的形态。
|
|
3
3
|
*
|
|
4
4
|
* 收起态由元素在 wire() 里用内联 display 做,而 data-scope / data-part 也是那一刻才打上,
|
|
5
|
-
* 所以 JS
|
|
5
|
+
* 所以 JS 到达之前这段子树既没有皮肤也没有收起——内容会以裸文本堆在页面流里,
|
|
6
6
|
* 并被搜索引擎与读屏当作正文。SSR / SSG 直出时这段时间尤其长。
|
|
7
7
|
*
|
|
8
8
|
* 这里按作者写的 data-xh-part 选中,那是升级前唯一存在的标记。
|
|
9
|
+
* 名单与元素的对应由 check-undefined-guard.mjs 双向守着。
|
|
9
10
|
*/
|
|
10
11
|
@layer xihan.components {
|
|
11
12
|
:where(
|
|
13
|
+
xh-accordion,
|
|
12
14
|
xh-cascader,
|
|
15
|
+
xh-collapsible,
|
|
13
16
|
xh-color-picker,
|
|
14
17
|
xh-combobox,
|
|
15
18
|
xh-context-menu,
|
|
16
19
|
xh-date-picker,
|
|
17
20
|
xh-dialog,
|
|
18
21
|
xh-drawer,
|
|
22
|
+
xh-floating-panel,
|
|
19
23
|
xh-hover-card,
|
|
24
|
+
xh-image-viewer,
|
|
25
|
+
xh-mention,
|
|
20
26
|
xh-menu,
|
|
21
27
|
xh-menubar,
|
|
22
28
|
xh-navigation-menu,
|
|
29
|
+
xh-popconfirm,
|
|
23
30
|
xh-popover,
|
|
31
|
+
xh-popselect,
|
|
24
32
|
xh-select,
|
|
33
|
+
xh-side-nav,
|
|
34
|
+
xh-steps,
|
|
25
35
|
xh-time-picker,
|
|
26
36
|
xh-tooltip,
|
|
27
37
|
xh-tour,
|
package/css/virtualizer.css
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
@layer xihan.components {
|
|
2
|
+
/* 皮肤在场的标记:开发模式下按 scope 探一次,取不到就说明这份皮肤没被引入。 */
|
|
3
|
+
[data-scope='virtualizer'] {
|
|
4
|
+
--xh-virtualizer-skin: 1;
|
|
5
|
+
}
|
|
6
|
+
|
|
2
7
|
/* 定位分工:条目在**主轴**上的位移、以及 content 在主轴上的总长,
|
|
3
8
|
由连接层每帧写进内联样式(竖向是 inset-block-start / block-size,横向是
|
|
4
9
|
inset-inline-start / inline-size)。这份皮肤一个都不碰:内联优先级高于样式表,
|
|
@@ -13,7 +18,9 @@
|
|
|
13
18
|
|
|
14
19
|
[data-scope='virtualizer'][data-part='root'] {
|
|
15
20
|
display: block;
|
|
16
|
-
/* 作者给 root
|
|
21
|
+
/* 作者给 root 定了尺寸后,长列表不该漫出这个框;
|
|
22
|
+
自建定位上下文,作者往里挂的 scrollbar 贴的是这个框 */
|
|
23
|
+
position: relative;
|
|
17
24
|
overflow: hidden;
|
|
18
25
|
}
|
|
19
26
|
|