@xihan-ui/styles 1.0.0 → 2.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 +5146 -6
- package/README.md +22 -2
- package/component-tokens.d.ts +4212 -0
- package/component-tokens.js +2 -0
- package/components.tokens.json +80116 -0
- package/css/accordion.css +131 -75
- package/css/affix.css +16 -1
- package/css/alert.css +114 -67
- package/css/anchor.css +99 -27
- package/css/approval.css +461 -0
- package/css/avatar-group.css +14 -6
- package/css/avatar.css +33 -9
- package/css/back-top.css +103 -48
- package/css/badge.css +42 -14
- package/css/bar-code.css +62 -0
- package/css/breadcrumb.css +40 -21
- package/css/button-group.css +146 -24
- package/css/button.css +116 -99
- package/css/calendar-picker.css +448 -0
- package/css/calendar-range-picker.css +517 -0
- package/css/card.css +54 -77
- package/css/carousel.css +412 -68
- package/css/cascader.css +429 -246
- package/css/checkbox-group.css +225 -77
- package/css/checkbox.css +174 -37
- package/css/clipboard.css +266 -47
- package/css/code-view.css +279 -0
- package/css/collapsible.css +108 -63
- package/css/color-field.css +158 -0
- package/css/color-picker.css +172 -184
- package/css/color-slider.css +274 -0
- package/css/color-swatch-picker.css +243 -0
- package/css/color-swatch.css +35 -0
- package/css/combobox.css +267 -273
- package/css/command.css +399 -0
- package/css/context-menu.css +183 -108
- package/css/date-field.css +94 -121
- package/css/date-picker.css +486 -249
- package/css/date-range-picker.css +559 -0
- package/css/description.css +51 -0
- package/css/descriptions.css +133 -87
- package/css/dialog.css +247 -68
- package/css/diff-view.css +428 -0
- package/css/download-trigger.css +155 -46
- package/css/drawer.css +194 -111
- package/css/editable.css +172 -152
- package/css/empty-state.css +80 -11
- package/css/field-array.css +190 -0
- package/css/field.css +84 -31
- package/css/fieldset.css +51 -18
- package/css/file-upload.css +134 -36
- package/css/flex.css +20 -1
- package/css/float-button.css +238 -57
- package/css/floating-panel.css +173 -92
- package/css/focus.css +46 -0
- package/css/forced-colors.css +93 -0
- package/css/form.css +254 -77
- package/css/gradient-text.css +34 -10
- package/css/grid.css +516 -5
- package/css/heatmap.css +87 -29
- package/css/highlight.css +20 -5
- package/css/hover-card.css +97 -47
- package/css/icon-wrapper.css +15 -3
- package/css/icon.css +74 -8
- package/css/image-cropper.css +143 -29
- package/css/image-viewer.css +150 -89
- package/css/image.css +30 -1
- package/css/infinite-scroll.css +51 -1
- package/css/input-group.css +277 -0
- package/css/json-viewer.css +102 -45
- package/css/kbd.css +72 -0
- package/css/label.css +78 -0
- package/css/layers.css +5 -0
- package/css/layout.css +175 -31
- package/css/list.css +24 -3
- package/css/listbox.css +208 -67
- package/css/loading-bar.css +52 -3
- package/css/log.css +144 -9
- package/css/markdown-stream.css +149 -0
- package/css/marquee.css +27 -1
- package/css/masonry.css +7 -0
- package/css/matrix-code.css +67 -0
- package/css/mention.css +234 -152
- package/css/menu.css +180 -83
- package/css/menubar.css +204 -136
- package/css/message-feed.css +197 -0
- package/css/navigation-menu.css +144 -90
- package/css/notification.css +178 -100
- package/css/number-animation.css +7 -0
- package/css/number-field.css +120 -277
- package/css/overlay-arrow.css +12 -7
- package/css/page-header.css +99 -14
- package/css/pagination.css +175 -135
- package/css/password-input.css +222 -219
- package/css/pin-input.css +101 -67
- package/css/pointer.css +36 -0
- package/css/popconfirm.css +185 -94
- package/css/popover.css +121 -77
- package/css/progress.css +60 -12
- package/css/prompt-input.css +224 -0
- package/css/question-flow.css +513 -0
- package/css/radio-group.css +147 -30
- package/css/rating.css +193 -43
- package/css/reasoning.css +336 -0
- package/css/reset.css +84 -6
- package/css/resizable.css +237 -0
- package/css/scroll-area.css +68 -7
- package/css/scrollbar.css +47 -13
- package/css/segmented.css +94 -29
- package/css/select.css +288 -274
- package/css/separator.css +101 -1
- package/css/side-nav.css +133 -75
- package/css/signature-pad.css +74 -54
- package/css/skeleton.css +84 -11
- package/css/slider.css +132 -39
- package/css/sortable.css +198 -0
- package/css/spinner.css +126 -12
- package/css/splitter.css +29 -8
- package/css/statistic.css +55 -0
- package/css/steps.css +206 -72
- package/css/switch.css +268 -36
- package/css/table.css +695 -118
- package/css/tabs.css +604 -42
- package/css/tag-group.css +219 -0
- package/css/tag.css +118 -28
- package/css/tags-input.css +156 -274
- package/css/text-field.css +101 -249
- package/css/time-field.css +100 -128
- package/css/time-picker.css +323 -252
- package/css/time-range-picker.css +719 -0
- package/css/timeline.css +202 -68
- package/css/timer.css +56 -52
- package/css/timestamp.css +34 -0
- package/css/toast.css +373 -144
- package/css/toggle-group.css +309 -76
- package/css/toggle.css +116 -85
- package/css/tone.css +47 -0
- package/css/tool-call.css +421 -0
- package/css/toolbar.css +181 -33
- package/css/tooltip.css +107 -36
- package/css/tour.css +183 -152
- package/css/transfer.css +351 -138
- package/css/tree-select.css +323 -216
- package/css/tree.css +294 -62
- package/css/truncate.css +65 -0
- package/css/typography.css +228 -5
- package/css/undefined.css +10 -1
- package/css/virtualizer.css +9 -10
- package/css/visually-hidden.css +7 -0
- package/css/watermark.css +7 -0
- package/family/action-control.css +487 -0
- package/family/collection-item.css +721 -0
- package/family/field-chrome.css +298 -0
- package/family/motion.css +166 -0
- package/family/swatch.css +59 -0
- package/index.css +41705 -126
- package/index.unlayered.css +33692 -17339
- package/package.json +51 -17
- package/css/calendar.css +0 -367
- package/css/code-block.css +0 -91
- package/css/composer.css +0 -134
- package/css/countdown.css +0 -26
- package/css/dynamic-input.css +0 -220
- package/css/ellipsis.css +0 -52
- package/css/hotkeys.css +0 -90
- package/css/popselect.css +0 -391
- package/css/qr-code.css +0 -55
- package/css/result.css +0 -119
- package/css/space.css +0 -117
- package/css/thread.css +0 -120
- package/css/time.css +0 -25
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2021-Present XiHanFun and contributors.
|
|
3
|
+
* Licensed under the MIT License. See LICENSE in the project root for license information.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/* 定义 reasoning 样式。 */
|
|
7
|
+
|
|
8
|
+
/* 共享关键帧由 family/motion.css 提供,本皮肤 @import 它,单独引入仍成立;
|
|
9
|
+
独立皮肤同时传递引入开关的动作控件配方,full bundle 递归去重。 */
|
|
10
|
+
@import '../family/motion.css';
|
|
11
|
+
@import '../family/action-control.css';
|
|
12
|
+
|
|
13
|
+
@layer xihan.components {
|
|
14
|
+
/* 皮肤在场的标记:开发模式下按 scope 探一次,取不到就说明这份皮肤没被引入。 */
|
|
15
|
+
[data-scope='reasoning'] {
|
|
16
|
+
--xh-reasoning-skin: 1;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* 一张淡底面:--xh-bg-subtle 底 + 透明边位 + 无影(§8 subtle 无影),描边留给 outline 档打开。
|
|
20
|
+
缺省淡底承载开关:向它下发 hover 200 → pressed 300 的阶梯(§7.2),白底档在形态规则里改回 100 → 200 */
|
|
21
|
+
[data-scope='reasoning'][data-part='root'] {
|
|
22
|
+
--xh-action-host-bg-hover: var(--xh-bg-subtle-hover);
|
|
23
|
+
--xh-action-host-bg-pressed: var(--xh-bg-subtle-active);
|
|
24
|
+
|
|
25
|
+
/* 作者塞进两个图形位的图标与皮肤画的兜底字形同一把尺:按档取(§6.5),与开关的家族档同步——
|
|
26
|
+
不写 data-size 时字号是 sm 档,字形随之取 sm */
|
|
27
|
+
--xh-_reasoning-icon-size: var(--xh-glyph-size-sm);
|
|
28
|
+
--xh-icon-size: var(--xh-reasoning-icon-size, var(--xh-_reasoning-icon-size));
|
|
29
|
+
|
|
30
|
+
/* 影另落一份进私有槽给语气档:它要把影与左侧色条叠成一条 box-shadow,缺省无影写成零影占位 */
|
|
31
|
+
--xh-_reasoning-shadow: var(--xh-reasoning-shadow, 0 0 0 transparent);
|
|
32
|
+
|
|
33
|
+
/* 尺寸缺省档:不写 data-size 时的取值。三档都只写这三个私有槽,
|
|
34
|
+
公开槽留在读处当首选,作者在祖先上设的覆盖才赢得过档位声明 */
|
|
35
|
+
--xh-_reasoning-px: var(--xh-space-3);
|
|
36
|
+
--xh-_reasoning-py: var(--xh-space-2);
|
|
37
|
+
--xh-_reasoning-font-size: var(--xh-control-font-sm);
|
|
38
|
+
|
|
39
|
+
display: block;
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
border: var(--xh-stroke-thin) solid transparent;
|
|
42
|
+
border-radius: var(--xh-reasoning-radius, var(--xh-shape-surface));
|
|
43
|
+
background: var(--xh-reasoning-bg, var(--xh-bg-subtle));
|
|
44
|
+
box-shadow: var(--xh-reasoning-shadow, none);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* 上面声明的 display 会盖掉 UA 的 [hidden]{display:none},这里补回 */
|
|
48
|
+
[data-scope='reasoning'][data-part='root'][hidden] {
|
|
49
|
+
display: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* —— 形态 —— */
|
|
53
|
+
/* 缺省档即 subtle,写在上面那条基础规则里 */
|
|
54
|
+
/* 描边分区:--xh-border-default 描边 + surface 底(§5.3 静态内容面);
|
|
55
|
+
白底承载面把开关的阶梯改回 hover 100 → pressed 200 */
|
|
56
|
+
[data-scope='reasoning'][data-part='root'][data-variant='outline'] {
|
|
57
|
+
--xh-action-host-bg-hover: var(--xh-bg-subtle);
|
|
58
|
+
--xh-action-host-bg-pressed: var(--xh-bg-subtle-hover);
|
|
59
|
+
|
|
60
|
+
border: var(--xh-stroke-thin) solid var(--xh-reasoning-border, var(--xh-border-default));
|
|
61
|
+
background: var(--xh-reasoning-bg, var(--xh-bg-surface));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* 无壳内联:思考过程贴着正文走,不占一块面;开关落在正文的白底上,阶梯同 outline 档 */
|
|
65
|
+
[data-scope='reasoning'][data-part='root'][data-variant='ghost'] {
|
|
66
|
+
--xh-action-host-bg-hover: var(--xh-bg-subtle);
|
|
67
|
+
--xh-action-host-bg-pressed: var(--xh-bg-subtle-hover);
|
|
68
|
+
|
|
69
|
+
overflow: visible;
|
|
70
|
+
background: none;
|
|
71
|
+
box-shadow: none;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* 无壳档的开关只占文字宽度(盖掉 profile 的铺满一行),自己带圆角,悬停时才浮出一块底 */
|
|
75
|
+
[data-scope='reasoning'][data-part='root'][data-variant='ghost'] [data-scope='reasoning'][data-part='trigger'] {
|
|
76
|
+
--xh-action-radius: var(--xh-reasoning-trigger-radius, var(--xh-shape-control));
|
|
77
|
+
|
|
78
|
+
inline-size: auto;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* 开关铺满一行,盒型、悬停 / 按下 / 禁用面由 Action Control 的 disclosure-trigger 档给(ghost 形态,
|
|
82
|
+
阶梯由根按承载面经 host 槽下发,按下只换面不缩放,§9.2);这里只把使用者槽映射到桥接槽:
|
|
83
|
+
圆角归零贴住面边,内衬与字号沿用本组件的档位(不取 profile 的内衬,几何不变),字色三态都停在
|
|
84
|
+
弱一档的 muted(开关不是正文);字形尺由根按同一档位给 */
|
|
85
|
+
[data-scope='reasoning'][data-part='trigger'] {
|
|
86
|
+
--xh-action-radius: 0;
|
|
87
|
+
--xh-action-gap: var(--xh-reasoning-trigger-gap, var(--xh-space-2));
|
|
88
|
+
--xh-action-padding-inline: var(--xh-reasoning-px, var(--xh-_reasoning-px));
|
|
89
|
+
--xh-action-padding-block: var(--xh-reasoning-py, var(--xh-_reasoning-py));
|
|
90
|
+
--xh-action-font-size: var(--xh-reasoning-font-size, var(--xh-_reasoning-font-size));
|
|
91
|
+
--xh-action-fg-rest: var(--xh-reasoning-trigger-fg, var(--xh-fg-muted));
|
|
92
|
+
--xh-action-fg-hover: var(--xh-reasoning-trigger-fg, var(--xh-fg-muted));
|
|
93
|
+
--xh-action-fg-pressed: var(--xh-reasoning-trigger-fg, var(--xh-fg-muted));
|
|
94
|
+
--xh-action-bg-hover: var(--xh-reasoning-trigger-bg-hover, var(--xh-_action-variant-bg-hover));
|
|
95
|
+
|
|
96
|
+
border-width: 0;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
[data-scope='reasoning'][data-part='trigger'][hidden] {
|
|
100
|
+
display: none;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* 状态图形位:在想的时候实一档,想完退回弱一档 */
|
|
104
|
+
[data-scope='reasoning'][data-part='icon'] {
|
|
105
|
+
display: inline-flex;
|
|
106
|
+
flex: none;
|
|
107
|
+
align-items: center;
|
|
108
|
+
justify-content: center;
|
|
109
|
+
color: var(--xh-reasoning-icon-fg, var(--xh-fg-subtle));
|
|
110
|
+
transition: color var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
[data-scope='reasoning'][data-part='icon'][data-streaming] {
|
|
114
|
+
color: var(--xh-reasoning-icon-streaming-fg, var(--xh-fg-muted));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
[data-scope='reasoning'][data-part='icon'][hidden] {
|
|
118
|
+
display: none;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* 指示随开合转向,纯装饰。转向与正文展开取同一档时长,两件事一起收尾 */
|
|
122
|
+
[data-scope='reasoning'][data-part='indicator'] {
|
|
123
|
+
display: inline-flex;
|
|
124
|
+
flex: none;
|
|
125
|
+
align-items: center;
|
|
126
|
+
justify-content: center;
|
|
127
|
+
color: var(--xh-reasoning-indicator-fg, var(--xh-fg-subtle));
|
|
128
|
+
transition: rotate var(--xh-motion-duration-enter) var(--xh-motion-ease-enter-strong);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* 没写内容就由皮肤画;作者往部件里塞了自己的图形,这条规则即不命中 */
|
|
132
|
+
[data-scope='reasoning'][data-part='indicator']:empty::before {
|
|
133
|
+
content: '';
|
|
134
|
+
display: inline-block;
|
|
135
|
+
inline-size: var(--xh-icon-size, var(--xh-glyph-size-md));
|
|
136
|
+
block-size: var(--xh-icon-size, var(--xh-glyph-size-md));
|
|
137
|
+
vertical-align: var(--xh-glyph-baseline-shift);
|
|
138
|
+
background-color: currentColor;
|
|
139
|
+
-webkit-mask: var(--xh-glyph-mark-chevron-down) center / contain no-repeat;
|
|
140
|
+
mask: var(--xh-glyph-mark-chevron-down) center / contain no-repeat;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
[data-scope='reasoning'][data-part='indicator'][data-state='open'] {
|
|
144
|
+
rotate: 180deg;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
[data-scope='reasoning'][data-part='indicator'][hidden] {
|
|
148
|
+
display: none;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* 状态文案排成一行,长了截断:换行会把开关的高度顶开,时长位跟着跳 */
|
|
152
|
+
[data-scope='reasoning'][data-part='label'] {
|
|
153
|
+
display: block;
|
|
154
|
+
flex: 1 1 auto;
|
|
155
|
+
overflow: hidden;
|
|
156
|
+
font-weight: var(--xh-reasoning-label-font-weight, var(--xh-text-label-weight));
|
|
157
|
+
white-space: nowrap;
|
|
158
|
+
text-overflow: ellipsis;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
[data-scope='reasoning'][data-part='label'][hidden] {
|
|
162
|
+
display: none;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* 还在想:一道亮带在文字上从右往左扫,字色由这层渐变裁出来 */
|
|
166
|
+
[data-scope='reasoning'][data-part='label'][data-streaming] {
|
|
167
|
+
background-image: linear-gradient(
|
|
168
|
+
90deg,
|
|
169
|
+
var(--xh-reasoning-shimmer-from, var(--xh-fg-subtle)) 35%,
|
|
170
|
+
var(--xh-reasoning-shimmer-to, var(--xh-fg-default)) 50%,
|
|
171
|
+
var(--xh-reasoning-shimmer-from, var(--xh-fg-subtle)) 65%
|
|
172
|
+
);
|
|
173
|
+
background-size: 200% 100%;
|
|
174
|
+
-webkit-background-clip: text;
|
|
175
|
+
background-clip: text;
|
|
176
|
+
color: transparent;
|
|
177
|
+
animation: xh-reasoning-shimmer var(--xh-reasoning-shimmer-duration, var(--xh-shimmer-duration)) var(--xh-motion-ease-loop) infinite;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/*
|
|
181
|
+
* 减少动效:撤掉扫光那层,换成一档更实的静态字色。
|
|
182
|
+
* 这里不能只把时长压到接近零——光带会停在某一帧上,在文字上留下一道说不清的渐变;
|
|
183
|
+
* 而撤掉渐变又不还字色的话,被裁成透明的文字会整句消失。
|
|
184
|
+
* 两条规则是同一件事的两个触发条件:系统偏好与作者打的 data-motion。
|
|
185
|
+
*/
|
|
186
|
+
@media (prefers-reduced-motion: reduce) {
|
|
187
|
+
[data-scope='reasoning'][data-part='label'][data-streaming] {
|
|
188
|
+
background-image: none;
|
|
189
|
+
-webkit-background-clip: border-box;
|
|
190
|
+
background-clip: border-box;
|
|
191
|
+
color: var(--xh-reasoning-label-streaming-fg, var(--xh-fg-default));
|
|
192
|
+
animation: none;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
:where([data-motion='reduce']) [data-scope='reasoning'][data-part='label'][data-streaming] {
|
|
197
|
+
background-image: none;
|
|
198
|
+
-webkit-background-clip: border-box;
|
|
199
|
+
background-clip: border-box;
|
|
200
|
+
color: var(--xh-reasoning-label-streaming-fg, var(--xh-fg-default));
|
|
201
|
+
animation: none;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
[data-scope='reasoning'][data-part='duration'] {
|
|
205
|
+
display: block;
|
|
206
|
+
flex: none;
|
|
207
|
+
color: var(--xh-reasoning-duration-fg, var(--xh-fg-subtle));
|
|
208
|
+
font-size: var(--xh-reasoning-duration-font-size, var(--xh-text-caption-size));
|
|
209
|
+
font-variant-numeric: tabular-nums;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
[data-scope='reasoning'][data-part='duration'][hidden] {
|
|
213
|
+
display: none;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* 想完那一下两句文案整句换掉,淡入接住这次替换 */
|
|
217
|
+
[data-scope='reasoning'][data-part='label']:not([data-streaming]),
|
|
218
|
+
[data-scope='reasoning'][data-part='duration']:not([data-streaming]) {
|
|
219
|
+
animation: xh-reasoning-fade-in var(--xh-motion-duration-enter) var(--xh-motion-ease-enter-strong) both;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/*
|
|
223
|
+
* 思考正文是散文:段落排版,不用等宽,行距比正文松一档。
|
|
224
|
+
* 左侧一条轨迹线把这一段与开关分开,起点对齐开关里的图形位。
|
|
225
|
+
*
|
|
226
|
+
* 这里刻意没有 [data-part='content'][hidden] { display: none }:补了动画一帧都播不出来。
|
|
227
|
+
* 收起由适配器在退场结束后写内联 display 落成,退场窗口内靠 connect 发的 inert 挡住焦点。
|
|
228
|
+
*/
|
|
229
|
+
[data-scope='reasoning'][data-part='content'] {
|
|
230
|
+
/* 行高与内缩同帧动的共享关键帧读这条槽:只有末端有内缩,起端不写、按 0 动 */
|
|
231
|
+
--xh-_disclosure-pb: var(--xh-reasoning-py, var(--xh-_reasoning-py));
|
|
232
|
+
|
|
233
|
+
display: grid;
|
|
234
|
+
grid-template-rows: 1fr;
|
|
235
|
+
overflow: clip;
|
|
236
|
+
margin-inline-start: var(--xh-reasoning-rail-inset, var(--xh-reasoning-px, var(--xh-_reasoning-px)));
|
|
237
|
+
border-inline-start: var(--xh-reasoning-rail-width, var(--xh-stroke-thin)) solid var(--xh-reasoning-rail, var(--xh-border-subtle));
|
|
238
|
+
padding-inline-start: var(--xh-reasoning-content-ps, var(--xh-space-3));
|
|
239
|
+
padding-inline-end: var(--xh-reasoning-content-pe, var(--xh-reasoning-px, var(--xh-_reasoning-px)));
|
|
240
|
+
padding-block-end: var(--xh-reasoning-py, var(--xh-_reasoning-py));
|
|
241
|
+
color: var(--xh-reasoning-content-fg, var(--xh-fg-muted));
|
|
242
|
+
font-size: var(--xh-reasoning-content-font-size, var(--xh-text-secondary-size));
|
|
243
|
+
line-height: var(--xh-reasoning-content-leading, var(--xh-text-prose-leading));
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/* 展开那一档才提前备好行高这条通道:属性随 data-state 一起消失,收起后不长期占着 */
|
|
247
|
+
[data-scope='reasoning'][data-part='content'][data-state='open'] {
|
|
248
|
+
will-change: grid-template-rows;
|
|
249
|
+
animation: xh-disclosure-expand var(--xh-motion-duration-enter) var(--xh-motion-ease-enter-strong);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
[data-scope='reasoning'][data-part='content'][data-state='closed'] {
|
|
253
|
+
animation: xh-disclosure-collapse var(--xh-motion-duration-exit) var(--xh-motion-ease-exit) forwards;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/* 尺寸档改内衬、字号与图标档 */
|
|
257
|
+
[data-scope='reasoning'][data-part='root'][data-size='sm'] {
|
|
258
|
+
--xh-_reasoning-icon-size: var(--xh-glyph-size-sm);
|
|
259
|
+
--xh-_reasoning-px: var(--xh-space-2);
|
|
260
|
+
--xh-_reasoning-py: var(--xh-space-1);
|
|
261
|
+
--xh-_reasoning-font-size: var(--xh-control-font-sm);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
[data-scope='reasoning'][data-part='root'][data-size='md'] {
|
|
265
|
+
--xh-_reasoning-icon-size: var(--xh-glyph-size-md);
|
|
266
|
+
--xh-_reasoning-px: var(--xh-space-3);
|
|
267
|
+
--xh-_reasoning-py: var(--xh-space-2);
|
|
268
|
+
--xh-_reasoning-font-size: var(--xh-control-font-md);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
[data-scope='reasoning'][data-part='root'][data-size='lg'] {
|
|
272
|
+
--xh-_reasoning-icon-size: var(--xh-glyph-size-lg);
|
|
273
|
+
--xh-_reasoning-px: var(--xh-space-4);
|
|
274
|
+
--xh-_reasoning-py: var(--xh-space-3);
|
|
275
|
+
--xh-_reasoning-font-size: var(--xh-control-font-lg);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/* 语气只染左侧那一条色条,海拔跟着一起落在同一条 box-shadow 上 */
|
|
279
|
+
[data-scope='reasoning'][data-part='root'][data-tone] {
|
|
280
|
+
box-shadow:
|
|
281
|
+
inset var(--xh-reasoning-tone-bar, var(--xh-stroke-thick)) 0 0 0 var(--xh-reasoning-tone-fg, var(--xh-_tone-soft, var(--xh-bg-brand))),
|
|
282
|
+
var(--xh-_reasoning-shadow);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
@layer xihan.motion {
|
|
287
|
+
/* 文案整句换掉时接住这次替换 */
|
|
288
|
+
@keyframes xh-reasoning-fade-in {
|
|
289
|
+
from {
|
|
290
|
+
opacity: 0;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
to {
|
|
294
|
+
opacity: 1;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/* 亮带从右往左扫过文字。背景图比自身宽一倍,只移动背景位置,不动布局 */
|
|
299
|
+
@keyframes xh-reasoning-shimmer {
|
|
300
|
+
from {
|
|
301
|
+
background-position: 150% center;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
to {
|
|
305
|
+
background-position: -50% center;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
@media print {
|
|
310
|
+
/* 打印:动画会被定格在任意一帧——转了一半的圈、扫到一半的微光。这里换成静止的表达,
|
|
311
|
+
取值与减弱动效那一档相同。两档各写一块、不并进一条媒体查询列表:减弱动效另有一份
|
|
312
|
+
:where([data-motion='reduce']) 的钩子版本与它成对,打印没有对应的钩子可配,
|
|
313
|
+
并成一条之后这层配对关系在文本上就断了。 */
|
|
314
|
+
[data-scope='reasoning'][data-part='label'][data-streaming] {
|
|
315
|
+
background-image: none;
|
|
316
|
+
-webkit-background-clip: border-box;
|
|
317
|
+
background-clip: border-box;
|
|
318
|
+
color: var(--xh-reasoning-label-streaming-fg, var(--xh-fg-default));
|
|
319
|
+
animation: none;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/*
|
|
324
|
+
* 高对比档:扫光那层渐变被丢弃,只剩被裁成透明的文字,整行标题消失。
|
|
325
|
+
* 把填充还回去,在想这件事仍由标题文字本身与展开钮的状态表出。
|
|
326
|
+
*/
|
|
327
|
+
@media (forced-colors: active) {
|
|
328
|
+
[data-scope='reasoning'][data-part='label'][data-streaming] {
|
|
329
|
+
background-image: none;
|
|
330
|
+
-webkit-background-clip: border-box;
|
|
331
|
+
background-clip: border-box;
|
|
332
|
+
color: CanvasText;
|
|
333
|
+
animation: none;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
package/css/reset.css
CHANGED
|
@@ -1,13 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2021-Present XiHanFun and contributors.
|
|
3
|
+
* Licensed under the MIT License. See LICENSE in the project root for license information.
|
|
4
|
+
*/
|
|
5
|
+
|
|
1
6
|
/*
|
|
2
7
|
* 库自己的基线,只作用于带 data-scope 的库节点,不碰宿主页面的任何元素。
|
|
3
8
|
*
|
|
4
9
|
* 层序上 xihan.reset 在 xihan.components 之前,所以组件皮肤里的任何显式声明都盖得住这里。
|
|
10
|
+
*
|
|
11
|
+
* 本层全部选择器(剥去伪元素)特指度为 (0,0,0):一律以 :where() 包住。无层产物
|
|
12
|
+
* index.unlayered.css 里没有层序可依,只按特指度竞争,而 Family Recipe 的根规则
|
|
13
|
+
* ([data-xh-action-control] 一类,(0,1,0))在产物里排在本文件之前——本层若同为 (0,1,0),
|
|
14
|
+
* 靠源序就把配方的三档字号压掉。压到 (0,0,0) 后,无层产物里任何皮肤与配方规则都压得住它;
|
|
15
|
+
* 代价是无层模式下宿主的元素选择器 (0,0,1) 也压得过,写在文档站「皮肤与样式分层」。
|
|
5
16
|
*/
|
|
6
17
|
@layer xihan.reset {
|
|
7
18
|
/* 尺寸一律含边框:皮肤里的宽高都是照可见盒子写的。 */
|
|
8
|
-
[data-scope]
|
|
9
|
-
|
|
10
|
-
|
|
19
|
+
:where([data-scope]) {
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* 伪元素自身带 (0,0,1),无法再低;:where() 只压掉宿主那一截。 */
|
|
24
|
+
:where([data-scope])::before,
|
|
25
|
+
:where([data-scope])::after {
|
|
11
26
|
box-sizing: border-box;
|
|
12
27
|
}
|
|
13
28
|
|
|
@@ -15,7 +30,7 @@
|
|
|
15
30
|
* UA 样式会把表单控件的字体锁成系统默认,不跟随页面。
|
|
16
31
|
* 这几个元素是 UA 唯一强制字体的地方,标题一类不在其中,故不做全局 font: inherit。
|
|
17
32
|
*/
|
|
18
|
-
[data-scope]:where(button, input, optgroup, select, textarea) {
|
|
33
|
+
:where([data-scope]):where(button, input, optgroup, select, textarea) {
|
|
19
34
|
font: inherit;
|
|
20
35
|
letter-spacing: inherit;
|
|
21
36
|
}
|
|
@@ -29,11 +44,74 @@
|
|
|
29
44
|
* 用 visibility 而不是 display:display:none 会让浮层退出排版,引擎量不到它的尺寸。
|
|
30
45
|
* 锚点被滚出可视区时引擎置 hidden,各皮肤另有一条 [data-hidden] 压回去。
|
|
31
46
|
*/
|
|
32
|
-
[data-scope][data-part='positioner'] {
|
|
47
|
+
:where([data-scope][data-part='positioner']) {
|
|
33
48
|
visibility: hidden;
|
|
34
49
|
}
|
|
35
50
|
|
|
36
|
-
[data-scope][data-part='positioner'][data-positioned] {
|
|
51
|
+
:where([data-scope][data-part='positioner'][data-positioned]) {
|
|
37
52
|
visibility: visible;
|
|
38
53
|
}
|
|
54
|
+
|
|
55
|
+
/*
|
|
56
|
+
* 库内原生滚动面与作者容器共用的细条。
|
|
57
|
+
*
|
|
58
|
+
* 两档滚动面里的「原生细条」档:页内结构容器(Table、Tree、Virtualizer viewport、
|
|
59
|
+
* Dialog / Drawer body、Log 视口一类)不接自绘条,靠这里把原生条统一成 thin + 令牌色阶。
|
|
60
|
+
* 三个入口:库节点([data-scope][data-part])、作者自建滚动容器与文档示例([data-xh-scroll])、
|
|
61
|
+
* Typography prose 里的 <pre>——它是库内唯一不带 data-part 的滚动面,作者只写 <pre> 不写角色。
|
|
62
|
+
* 皮肤不得再手写 scrollbar-width / scrollbar-color(stylelint 判红),要藏条写 none。
|
|
63
|
+
* 这里不写 scrollbar-gutter:auto 是初始值,stable 只给内容高度会变的容器由皮肤显式写。
|
|
64
|
+
* ::-webkit-scrollbar-thumb 的圆角取 pill:原生滑块与自绘 scrollbar:thumb 同为一维对象(真源 §6.3),
|
|
65
|
+
* 不再按厚度折半凑半圆,三档厚度都是同一身份。
|
|
66
|
+
*
|
|
67
|
+
* 令牌住在 xihan.tokens 层、排在本层之后,但自定义属性的求值不受层序影响:
|
|
68
|
+
* var() 在计算值阶段沿元素树取值,层序只裁决同一属性的两条声明谁赢。
|
|
69
|
+
* [data-xh-scrollbar] 的 scrollbar-width: none 是 (0,1,0),有层与无层两种产物里都压得住本条;
|
|
70
|
+
* ::-webkit-scrollbar 伪元素自带 (0,0,1),ScrollArea 那条 display: none 同样压得住。
|
|
71
|
+
*/
|
|
72
|
+
:where([data-scope][data-part], [data-xh-scroll], [data-scope='typography'][data-part='prose'] pre) {
|
|
73
|
+
scrollbar-width: thin;
|
|
74
|
+
scrollbar-color: var(--xh-fg-scrollbar-thumb) var(--xh-bg-scrollbar-track);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
:where([data-scope][data-part], [data-xh-scroll], [data-scope='typography'][data-part='prose'] pre)::-webkit-scrollbar {
|
|
78
|
+
width: var(--xh-scrollbar-thickness-md);
|
|
79
|
+
height: var(--xh-scrollbar-thickness-md);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
:where([data-scope][data-part], [data-xh-scroll], [data-scope='typography'][data-part='prose'] pre)::-webkit-scrollbar-track {
|
|
83
|
+
background: var(--xh-bg-scrollbar-track);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
:where([data-scope][data-part], [data-xh-scroll], [data-scope='typography'][data-part='prose'] pre)::-webkit-scrollbar-thumb {
|
|
87
|
+
border-radius: var(--xh-shape-pill);
|
|
88
|
+
background: var(--xh-fg-scrollbar-thumb);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
:where([data-scope][data-part], [data-xh-scroll], [data-scope='typography'][data-part='prose'] pre)::-webkit-scrollbar-thumb:hover {
|
|
92
|
+
background: var(--xh-fg-scrollbar-thumb-hover);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
:where([data-scope][data-part], [data-xh-scroll], [data-scope='typography'][data-part='prose'] pre)::-webkit-scrollbar-thumb:active {
|
|
96
|
+
background: var(--xh-fg-scrollbar-thumb-active);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/*
|
|
100
|
+
* 选区高亮的底与字。不写这条时用的是 UA 的系统高亮色(多数是系统蓝底白字):
|
|
101
|
+
* 它不跟主题走,深色档下这块蓝会横在面板上,选中的文字反而比没选中时更难认。
|
|
102
|
+
*
|
|
103
|
+
* 后代那条不是冗余。高亮样式虽然会沿元素树往下继承,但「直接命中该元素的声明」
|
|
104
|
+
* 永远压过继承来的值:宿主页面自己写一条通配的 ::selection,它直接命中我们子树里
|
|
105
|
+
* 的每一个后代元素——只写第一条时,库节点自己的裸文本是我们的色,里面每个 <span>
|
|
106
|
+
* 却回退成宿主的色,一段文字选出两种底。两条一起写,整棵子树才是同一个色。
|
|
107
|
+
* 两条都以 [data-scope] 起手,着色止于库子树,宿主页面自己的选区不受影响。
|
|
108
|
+
*
|
|
109
|
+
* 只写这两个属性:高亮伪元素能吃的属性极窄,box-shadow / border 一类多数引擎
|
|
110
|
+
* 直接丢弃,不报错也不生效,写了只会让人以为已经处理过。
|
|
111
|
+
*/
|
|
112
|
+
:where([data-scope])::selection,
|
|
113
|
+
:where([data-scope]) *::selection {
|
|
114
|
+
background: var(--xh-bg-brand-subtle);
|
|
115
|
+
color: var(--xh-fg-default);
|
|
116
|
+
}
|
|
39
117
|
}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2021-Present XiHanFun and contributors.
|
|
3
|
+
* Licensed under the MIT License. See LICENSE in the project root for license information.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/* 定义 resizable 样式。 */
|
|
7
|
+
|
|
8
|
+
@layer xihan.components {
|
|
9
|
+
/* 皮肤在场的标记:开发模式下按 scope 探一次,取不到就说明这份皮肤没被引入。 */
|
|
10
|
+
[data-scope='resizable'] {
|
|
11
|
+
--xh-resizable-skin: 1;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* 分工:**尺寸与位移**由连接层每帧写进内联样式(inline-size / block-size / left / top)。
|
|
15
|
+
这份皮肤一条都不碰那四个——内联优先级更高,写了不但是死声明,
|
|
16
|
+
还会在拖动的每一帧跟连接层抢位置。皮肤只管定位上下文、把手落位与状态表现。 */
|
|
17
|
+
|
|
18
|
+
/* 定位上下文,八向可调靠它才成立:
|
|
19
|
+
推西边与北边时容器的起点会动,那段位移写成 left / top。relative 的 left / top
|
|
20
|
+
是视觉位移、元素仍占原位,因此对边钉得住。改成 static 会让这两个方向只变尺寸不移位。 */
|
|
21
|
+
[data-scope='resizable'][data-part='root'] {
|
|
22
|
+
position: relative;
|
|
23
|
+
/* 把层序关在容器里:把手的 1 / 2 只跟彼此比,不跟外面的层号打架 */
|
|
24
|
+
isolation: isolate;
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* 调整期间关掉选中:把手一按就会把容器里的文字刷成选中态 */
|
|
29
|
+
[data-scope='resizable'][data-part='root'][data-resizing] {
|
|
30
|
+
user-select: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* 这里的 data-disabled 关掉的是「能不能调尺寸」,容器里作者的内容照常可用:
|
|
34
|
+
光标交回给作者,不摆共享层那个「不可用」的样子 */
|
|
35
|
+
[data-scope='resizable'][data-part='root'][data-disabled] {
|
|
36
|
+
cursor: inherit;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
[data-scope='resizable'][data-part='root'][hidden] {
|
|
40
|
+
display: none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* 把手命中区留在容器内部并覆盖对应边;视觉指示条贴住容器边框,由伪元素绘制。 */
|
|
44
|
+
[data-scope='resizable'][data-part='handle'] {
|
|
45
|
+
--xh-_resizable-indicator-color: var(
|
|
46
|
+
--xh-resizable-handle-bg,
|
|
47
|
+
color-mix(in oklab, var(--xh-fg-default) 18%, transparent)
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
position: absolute;
|
|
51
|
+
z-index: 1;
|
|
52
|
+
display: block;
|
|
53
|
+
background: transparent;
|
|
54
|
+
touch-action: none;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
[data-scope='resizable'][data-part='handle']::after {
|
|
58
|
+
content: '';
|
|
59
|
+
position: absolute;
|
|
60
|
+
border-radius: var(--xh-resizable-handle-radius, var(--xh-shape-pill));
|
|
61
|
+
background: var(--xh-_resizable-indicator-color);
|
|
62
|
+
pointer-events: none;
|
|
63
|
+
transition:
|
|
64
|
+
background var(--xh-motion-duration-micro) var(--xh-motion-ease-enter),
|
|
65
|
+
border-color var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[data-scope='resizable'][data-part='handle']:hover {
|
|
69
|
+
--xh-_resizable-indicator-color: var(
|
|
70
|
+
--xh-resizable-handle-bg-hover,
|
|
71
|
+
color-mix(in oklab, var(--xh-fg-default) 32%, transparent)
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
[data-scope='resizable'][data-part='handle'][data-resizing] {
|
|
76
|
+
--xh-_resizable-indicator-color: var(--xh-resizable-handle-bg-active, var(--xh-bg-brand));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
[data-scope='resizable'][data-part='handle']:focus-visible {
|
|
80
|
+
--xh-_resizable-indicator-color: var(--xh-ring-focus);
|
|
81
|
+
|
|
82
|
+
outline: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
[data-scope='resizable'][data-part='handle'][hidden] {
|
|
86
|
+
display: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* 四条边:各占一整条,厚度是可抓的余量 */
|
|
90
|
+
[data-scope='resizable'][data-part='handle'][data-edge='n'],
|
|
91
|
+
[data-scope='resizable'][data-part='handle'][data-edge='s'] {
|
|
92
|
+
inset-inline: var(--xh-resizable-grip, var(--xh-space-2));
|
|
93
|
+
block-size: var(--xh-resizable-grip, var(--xh-space-2));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
[data-scope='resizable'][data-part='handle'][data-edge='e'],
|
|
97
|
+
[data-scope='resizable'][data-part='handle'][data-edge='w'] {
|
|
98
|
+
inset-block: var(--xh-resizable-grip, var(--xh-space-2));
|
|
99
|
+
inline-size: var(--xh-resizable-grip, var(--xh-space-2));
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* 落位用逻辑属性:e 说的是行尾侧,从右往左排版时它就该落在屏幕左边——
|
|
103
|
+
机器那边也是把逻辑边翻成物理边再算几何的,两处同源 */
|
|
104
|
+
[data-scope='resizable'][data-part='handle'][data-edge='n'] {
|
|
105
|
+
inset-block-start: 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
[data-scope='resizable'][data-part='handle'][data-edge='s'] {
|
|
109
|
+
inset-block-end: 0;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
[data-scope='resizable'][data-part='handle'][data-edge='e'] {
|
|
113
|
+
inset-inline-end: 0;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
[data-scope='resizable'][data-part='handle'][data-edge='w'] {
|
|
117
|
+
inset-inline-start: 0;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
[data-scope='resizable'][data-part='handle']:is([data-edge='n'], [data-edge='s'])::after {
|
|
121
|
+
inset-inline-start: 50%;
|
|
122
|
+
inline-size: var(--xh-resizable-indicator-length, var(--xh-space-8));
|
|
123
|
+
block-size: var(--xh-resizable-indicator-thickness, var(--xh-stroke-strong));
|
|
124
|
+
translate: -50% 0;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
[data-scope='resizable'][data-part='handle'][data-edge='n']::after {
|
|
128
|
+
inset-block-start: var(--xh-resizable-indicator-inset, 0);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
[data-scope='resizable'][data-part='handle'][data-edge='s']::after {
|
|
132
|
+
inset-block-end: var(--xh-resizable-indicator-inset, 0);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
[data-scope='resizable'][data-part='handle']:is([data-edge='e'], [data-edge='w'])::after {
|
|
136
|
+
inset-block-start: 50%;
|
|
137
|
+
inline-size: var(--xh-resizable-indicator-thickness, var(--xh-stroke-strong));
|
|
138
|
+
block-size: var(--xh-resizable-indicator-length, var(--xh-space-8));
|
|
139
|
+
translate: 0 -50%;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
[data-scope='resizable'][data-part='handle'][data-edge='e']::after {
|
|
143
|
+
inset-inline-end: var(--xh-resizable-indicator-inset, 0);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
[data-scope='resizable'][data-part='handle'][data-edge='w']::after {
|
|
147
|
+
inset-inline-start: var(--xh-resizable-indicator-inset, 0);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* 四个角:压在两条边的交点上,盖过相邻两条边(它们同时动两轴) */
|
|
151
|
+
[data-scope='resizable'][data-part='handle'][data-edge='ne'],
|
|
152
|
+
[data-scope='resizable'][data-part='handle'][data-edge='nw'],
|
|
153
|
+
[data-scope='resizable'][data-part='handle'][data-edge='se'],
|
|
154
|
+
[data-scope='resizable'][data-part='handle'][data-edge='sw'] {
|
|
155
|
+
z-index: 2;
|
|
156
|
+
inline-size: var(--xh-resizable-corner, var(--xh-space-4));
|
|
157
|
+
block-size: var(--xh-resizable-corner, var(--xh-space-4));
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
[data-scope='resizable'][data-part='handle'][data-edge='nw'] {
|
|
161
|
+
inset-block-start: 0;
|
|
162
|
+
inset-inline-start: 0;
|
|
163
|
+
border-start-start-radius: inherit;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
[data-scope='resizable'][data-part='handle'][data-edge='ne'] {
|
|
167
|
+
inset-block-start: 0;
|
|
168
|
+
inset-inline-end: 0;
|
|
169
|
+
border-start-end-radius: inherit;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
[data-scope='resizable'][data-part='handle'][data-edge='sw'] {
|
|
173
|
+
inset-block-end: 0;
|
|
174
|
+
inset-inline-start: 0;
|
|
175
|
+
border-end-start-radius: inherit;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
[data-scope='resizable'][data-part='handle'][data-edge='se'] {
|
|
179
|
+
inset-block-end: 0;
|
|
180
|
+
inset-inline-end: 0;
|
|
181
|
+
border-end-end-radius: inherit;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
[data-scope='resizable'][data-part='handle']:is(
|
|
185
|
+
[data-edge='ne'],
|
|
186
|
+
[data-edge='nw'],
|
|
187
|
+
[data-edge='se'],
|
|
188
|
+
[data-edge='sw']
|
|
189
|
+
)::after {
|
|
190
|
+
inline-size: 50%;
|
|
191
|
+
block-size: 50%;
|
|
192
|
+
border: 0 solid var(--xh-_resizable-indicator-color);
|
|
193
|
+
border-radius: inherit;
|
|
194
|
+
background: transparent;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
[data-scope='resizable'][data-part='handle'][data-edge='nw']::after {
|
|
198
|
+
inset-block-start: var(--xh-resizable-corner-inset, 0);
|
|
199
|
+
inset-inline-start: var(--xh-resizable-corner-inset, 0);
|
|
200
|
+
border-block-start-width: var(--xh-resizable-indicator-thickness, var(--xh-stroke-strong));
|
|
201
|
+
border-inline-start-width: var(--xh-resizable-indicator-thickness, var(--xh-stroke-strong));
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
[data-scope='resizable'][data-part='handle'][data-edge='ne']::after {
|
|
205
|
+
inset-block-start: var(--xh-resizable-corner-inset, 0);
|
|
206
|
+
inset-inline-end: var(--xh-resizable-corner-inset, 0);
|
|
207
|
+
border-block-start-width: var(--xh-resizable-indicator-thickness, var(--xh-stroke-strong));
|
|
208
|
+
border-inline-end-width: var(--xh-resizable-indicator-thickness, var(--xh-stroke-strong));
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
[data-scope='resizable'][data-part='handle'][data-edge='sw']::after {
|
|
212
|
+
inset-block-end: var(--xh-resizable-corner-inset, 0);
|
|
213
|
+
inset-inline-start: var(--xh-resizable-corner-inset, 0);
|
|
214
|
+
border-block-end-width: var(--xh-resizable-indicator-thickness, var(--xh-stroke-strong));
|
|
215
|
+
border-inline-start-width: var(--xh-resizable-indicator-thickness, var(--xh-stroke-strong));
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
[data-scope='resizable'][data-part='handle'][data-edge='se']::after {
|
|
219
|
+
inset-block-end: var(--xh-resizable-corner-inset, 0);
|
|
220
|
+
inset-inline-end: var(--xh-resizable-corner-inset, 0);
|
|
221
|
+
border-block-end-width: var(--xh-resizable-indicator-thickness, var(--xh-stroke-strong));
|
|
222
|
+
border-inline-end-width: var(--xh-resizable-indicator-thickness, var(--xh-stroke-strong));
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/* 没开放的边不显示把手:留着一个抓不动的区域只会让人反复去试 */
|
|
226
|
+
[data-scope='resizable'][data-part='handle'][data-disabled] {
|
|
227
|
+
display: none;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
@media (forced-colors: active) {
|
|
231
|
+
/* 把手那两档全是底色画出来的,这一档里底色被统一换成系统底色,两档与静息塌成一个样子。
|
|
232
|
+
改由描边把正在拖的那一条画出来 */
|
|
233
|
+
[data-scope='resizable'][data-part='handle'][data-resizing] {
|
|
234
|
+
--xh-_resizable-indicator-color: Highlight;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|