@xihan-ui/styles 3.0.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 +34 -0
- package/README.md +1 -1
- package/component-tokens.d.ts +28 -0
- package/components.tokens.json +651 -25
- package/css/color-picker.css +81 -0
- package/css/date-field.css +33 -0
- package/css/date-picker.css +75 -4
- package/css/date-range-picker.css +36 -2
- package/css/field.css +4 -0
- package/css/float-button.css +98 -0
- package/css/form.css +8 -0
- package/css/notification.css +8 -2
- package/css/table.css +17 -0
- package/css/time-picker.css +59 -2
- package/css/tree.css +81 -11
- package/index.css +496 -21
- package/index.unlayered.css +496 -21
- package/package.json +2 -2
package/index.css
CHANGED
|
@@ -5464,6 +5464,104 @@
|
|
|
5464
5464
|
inset-inline-end: max(var(--xh-_float-button-offset), env(safe-area-inset-left), env(safe-area-inset-right));
|
|
5465
5465
|
}
|
|
5466
5466
|
|
|
5467
|
+
/* —— 位置 ——
|
|
5468
|
+
拖到别处、或作者给了位置时,角落那两条贴边里有一条换掉:data-placement 由连接层按位置推出
|
|
5469
|
+
(离触发器最近的恒是视口的那条边、展开组朝页面中间长),这里只换沿边的那一条。
|
|
5470
|
+
百分比按固定定位的包含块(视口去掉滚动条)量,与连接层量的视口同一块;
|
|
5471
|
+
夹取的上下界与四角同样和安全区取大的一头,比例再怎么写,钮也不会压进刘海与横条。
|
|
5472
|
+
触发器边长取它自己那一档(使用者槽在前):沿边的比例量的是触发器中心 */
|
|
5473
|
+
[data-scope='float-button'][data-part='root'] {
|
|
5474
|
+
--xh-_float-button-span: var(--xh-float-button-size, var(--xh-_float-button-size));
|
|
5475
|
+
}
|
|
5476
|
+
|
|
5477
|
+
/* 贴左右边:上下按比例,锚在离触发器近的那一头 */
|
|
5478
|
+
[data-scope='float-button'][data-part='root'][data-edge^='inline'][data-placement^='top'] {
|
|
5479
|
+
inset-block-start: clamp(
|
|
5480
|
+
max(var(--xh-_float-button-offset), env(safe-area-inset-top)),
|
|
5481
|
+
calc(var(--xh-_float-button-ratio) * 100% - var(--xh-_float-button-span) / 2),
|
|
5482
|
+
calc(100% - var(--xh-_float-button-span) - max(var(--xh-_float-button-offset), env(safe-area-inset-bottom)))
|
|
5483
|
+
);
|
|
5484
|
+
}
|
|
5485
|
+
|
|
5486
|
+
[data-scope='float-button'][data-part='root'][data-edge^='inline'][data-placement^='bottom'] {
|
|
5487
|
+
inset-block-end: clamp(
|
|
5488
|
+
max(var(--xh-_float-button-offset), env(safe-area-inset-bottom)),
|
|
5489
|
+
calc((1 - var(--xh-_float-button-ratio)) * 100% - var(--xh-_float-button-span) / 2),
|
|
5490
|
+
calc(100% - var(--xh-_float-button-span) - max(var(--xh-_float-button-offset), env(safe-area-inset-top)))
|
|
5491
|
+
);
|
|
5492
|
+
}
|
|
5493
|
+
|
|
5494
|
+
/* 贴上下边:行内方向按比例,从行首量起 */
|
|
5495
|
+
[data-scope='float-button'][data-part='root'][data-edge^='block'][data-placement$='-start'] {
|
|
5496
|
+
inset-inline-start: clamp(
|
|
5497
|
+
max(var(--xh-_float-button-offset), env(safe-area-inset-left), env(safe-area-inset-right)),
|
|
5498
|
+
calc(var(--xh-_float-button-ratio) * 100% - var(--xh-_float-button-span) / 2),
|
|
5499
|
+
calc(100% - var(--xh-_float-button-span) - max(var(--xh-_float-button-offset), env(safe-area-inset-left), env(safe-area-inset-right)))
|
|
5500
|
+
);
|
|
5501
|
+
}
|
|
5502
|
+
|
|
5503
|
+
[data-scope='float-button'][data-part='root'][data-edge^='block'][data-placement$='-end'] {
|
|
5504
|
+
inset-inline-end: clamp(
|
|
5505
|
+
max(var(--xh-_float-button-offset), env(safe-area-inset-left), env(safe-area-inset-right)),
|
|
5506
|
+
calc((1 - var(--xh-_float-button-ratio)) * 100% - var(--xh-_float-button-span) / 2),
|
|
5507
|
+
calc(100% - var(--xh-_float-button-span) - max(var(--xh-_float-button-offset), env(safe-area-inset-left), env(safe-area-inset-right)))
|
|
5508
|
+
);
|
|
5509
|
+
}
|
|
5510
|
+
|
|
5511
|
+
/* 停在一点、或正跟着指针走:坐标是触发器左上角的物理像素,横向一律从左边量,不随书写方向翻。
|
|
5512
|
+
竖向锚在离触发器近的那一头:朝下长的锚上沿,朝上长的锚下沿,展开组冒出来时触发器不挪窝。
|
|
5513
|
+
停着的点仍夹在视口里(视口变小时不跑出去);跟手的坐标由连接层夹好,这里原样用 */
|
|
5514
|
+
[data-scope='float-button'][data-part='root'][data-point][data-placement] {
|
|
5515
|
+
inset-inline: auto;
|
|
5516
|
+
/* stylelint-disable-next-line property-disallowed-list -- 停点由连接层按指针的物理坐标写成 x,横向从左边量、不随书写方向翻 */
|
|
5517
|
+
left: clamp(
|
|
5518
|
+
max(var(--xh-_float-button-offset), env(safe-area-inset-left)),
|
|
5519
|
+
var(--xh-_float-button-x),
|
|
5520
|
+
calc(100% - var(--xh-_float-button-span) - max(var(--xh-_float-button-offset), env(safe-area-inset-right)))
|
|
5521
|
+
);
|
|
5522
|
+
}
|
|
5523
|
+
|
|
5524
|
+
[data-scope='float-button'][data-part='root'][data-point][data-placement^='top'] {
|
|
5525
|
+
top: clamp(
|
|
5526
|
+
max(var(--xh-_float-button-offset), env(safe-area-inset-top)),
|
|
5527
|
+
var(--xh-_float-button-y),
|
|
5528
|
+
calc(100% - var(--xh-_float-button-span) - max(var(--xh-_float-button-offset), env(safe-area-inset-bottom)))
|
|
5529
|
+
);
|
|
5530
|
+
}
|
|
5531
|
+
|
|
5532
|
+
[data-scope='float-button'][data-part='root'][data-point][data-placement^='bottom'] {
|
|
5533
|
+
bottom: clamp(
|
|
5534
|
+
max(var(--xh-_float-button-offset), env(safe-area-inset-bottom)),
|
|
5535
|
+
calc(100% - var(--xh-_float-button-y) - var(--xh-_float-button-span)),
|
|
5536
|
+
calc(100% - var(--xh-_float-button-span) - max(var(--xh-_float-button-offset), env(safe-area-inset-top)))
|
|
5537
|
+
);
|
|
5538
|
+
}
|
|
5539
|
+
|
|
5540
|
+
/* 跟手排在贴边与停点之后:拖动与落定途中压过提交了的位置 */
|
|
5541
|
+
[data-scope='float-button'][data-part='root'][data-moving][data-placement] {
|
|
5542
|
+
inset-inline: auto;
|
|
5543
|
+
/* stylelint-disable-next-line property-disallowed-list -- 同上:跟手坐标是指针的物理 x */
|
|
5544
|
+
left: var(--xh-_float-button-x);
|
|
5545
|
+
}
|
|
5546
|
+
|
|
5547
|
+
[data-scope='float-button'][data-part='root'][data-moving][data-placement^='top'] {
|
|
5548
|
+
top: var(--xh-_float-button-y);
|
|
5549
|
+
}
|
|
5550
|
+
|
|
5551
|
+
[data-scope='float-button'][data-part='root'][data-moving][data-placement^='bottom'] {
|
|
5552
|
+
bottom: calc(100% - var(--xh-_float-button-y) - var(--xh-_float-button-span));
|
|
5553
|
+
}
|
|
5554
|
+
|
|
5555
|
+
/* 能拖时触屏手指在触发器上的移动归拖动,不让浏览器拿去滚页面;光标提示能抓、正抓着 */
|
|
5556
|
+
[data-scope='float-button'][data-part='root'][data-draggable] [data-scope='float-button'][data-part='trigger'] {
|
|
5557
|
+
touch-action: none;
|
|
5558
|
+
cursor: grab;
|
|
5559
|
+
}
|
|
5560
|
+
|
|
5561
|
+
[data-scope='float-button'][data-part='root'][data-dragging] [data-scope='float-button'][data-part='trigger'] {
|
|
5562
|
+
cursor: grabbing;
|
|
5563
|
+
}
|
|
5564
|
+
|
|
5467
5565
|
/* —— 尺寸:原生动作项与触发器的 floating 档逐档同表 —— */
|
|
5468
5566
|
[data-scope='float-button'][data-part='root'][data-size='sm'] {
|
|
5469
5567
|
--xh-_float-button-size: var(--xh-control-box-md);
|
|
@@ -23689,6 +23787,46 @@
|
|
|
23689
23787
|
display: none;
|
|
23690
23788
|
}
|
|
23691
23789
|
|
|
23790
|
+
/* 多选的标签行:选中的颜色在盒里排成标签,超过 maxTagCount 的折进 +N。
|
|
23791
|
+
行里每一枚都是 tag(data-scope="tag"),样子归 tag.css;行怎么排、标签怎么进出归标签行家族配方。
|
|
23792
|
+
基准取 0:只吃触发钮剩下的宽度、在自己里面折行;按内容宽算基准的话,盒子会先在钮前面折行,把钮挤到最后一行 */
|
|
23793
|
+
[data-scope='color-picker'][data-part='tag-list'] {
|
|
23794
|
+
--xh-tag-list-gap: var(--xh-color-picker-tag-list-gap, var(--xh-space-1));
|
|
23795
|
+
|
|
23796
|
+
flex: 1 1 0;
|
|
23797
|
+
flex-wrap: wrap;
|
|
23798
|
+
}
|
|
23799
|
+
|
|
23800
|
+
/* 颜色标签是定长的值串,截短了就读不出是哪个颜色:不收缩,排不下就折到下一行,
|
|
23801
|
+
盒随行数长高(字段家族的 multi-tag 布局给),到上限后在盒内滚动 */
|
|
23802
|
+
[data-scope='color-picker'][data-part='tag-list'] > [data-scope='tag'][data-part='root'] {
|
|
23803
|
+
flex: none;
|
|
23804
|
+
}
|
|
23805
|
+
|
|
23806
|
+
/* 每枚标签前一个色点,颜色由连接层写进内联私有槽;+N 那一枚没有 data-value,不画。
|
|
23807
|
+
白色与近底色的颜色靠一圈默认描边从标签底上分出来 */
|
|
23808
|
+
[data-scope='color-picker'][data-part='tag-list'] > [data-scope='tag'][data-part='root'][data-value]::before {
|
|
23809
|
+
flex: none;
|
|
23810
|
+
box-sizing: border-box;
|
|
23811
|
+
inline-size: var(--xh-color-picker-tag-dot-size, var(--xh-control-indicator-sm));
|
|
23812
|
+
block-size: var(--xh-color-picker-tag-dot-size, var(--xh-control-indicator-sm));
|
|
23813
|
+
border: var(--xh-stroke-thin) solid var(--xh-color-picker-tag-dot-border, var(--xh-border-default));
|
|
23814
|
+
border-radius: var(--xh-shape-circle);
|
|
23815
|
+
background-color: var(--xh-_color-picker-tag-color, transparent);
|
|
23816
|
+
content: '';
|
|
23817
|
+
print-color-adjust: exact;
|
|
23818
|
+
}
|
|
23819
|
+
|
|
23820
|
+
[data-scope='color-picker'][data-part='control'][data-xh-field-layout='multi-tag'] {
|
|
23821
|
+
max-block-size: var(--xh-color-picker-control-max-h, var(--xh-viewport-h-sm));
|
|
23822
|
+
overflow-y: auto;
|
|
23823
|
+
}
|
|
23824
|
+
|
|
23825
|
+
/* 多选时值文字让位,触发钮只剩一颗显示工作色的色块:不再占满剩余宽度,标签行吃掉余下的位置 */
|
|
23826
|
+
[data-scope='color-picker'][data-part='control'][data-xh-field-layout='multi-tag'] > [data-scope='color-picker'][data-part='trigger'] {
|
|
23827
|
+
flex: none;
|
|
23828
|
+
}
|
|
23829
|
+
|
|
23692
23830
|
/* 盒内那颗可聚焦的按钮:不画描边不铺底也不自带高度,只占满剩余宽度、排布色块与值文本 */
|
|
23693
23831
|
[data-scope='color-picker'][data-part='trigger'] {
|
|
23694
23832
|
display: inline-flex;
|
|
@@ -24026,6 +24164,39 @@
|
|
|
24026
24164
|
color: var(--xh-fg-disabled);
|
|
24027
24165
|
}
|
|
24028
24166
|
|
|
24167
|
+
/* 「添加」沉到面板的行尾:它是多选时整块面板的出口,不跟取色面左对齐 */
|
|
24168
|
+
[data-scope='color-picker'][data-part='content'] > [data-scope='color-picker'][data-part='confirm-trigger'] {
|
|
24169
|
+
flex: none;
|
|
24170
|
+
align-self: flex-end;
|
|
24171
|
+
}
|
|
24172
|
+
|
|
24173
|
+
/* 「添加」是面板里唯一的主要动作:品牌实心、悬停 / 按下与 0.97 按压、焦点环全由 Action Control 的
|
|
24174
|
+
text solid 档给;槽名统一按部件取 --xh-color-picker-confirm-trigger-*,只映射到家族桥接槽 */
|
|
24175
|
+
[data-scope='color-picker'][data-part='confirm-trigger'] {
|
|
24176
|
+
--xh-action-visual-size: var(--xh-color-picker-confirm-trigger-h, var(--xh-_action-profile-visual-size));
|
|
24177
|
+
--xh-action-padding-inline: var(--xh-color-picker-confirm-trigger-px, var(--xh-_action-profile-padding-inline));
|
|
24178
|
+
--xh-action-radius: var(--xh-color-picker-confirm-trigger-radius, var(--xh-shape-control));
|
|
24179
|
+
--xh-action-bg-rest: var(--xh-color-picker-confirm-trigger-bg, var(--xh-_action-variant-bg-rest));
|
|
24180
|
+
--xh-action-bg-hover: var(--xh-color-picker-confirm-trigger-bg-hover, var(--xh-_action-variant-bg-hover));
|
|
24181
|
+
--xh-action-bg-pressed: var(--xh-color-picker-confirm-trigger-bg-active, var(--xh-_action-variant-bg-pressed));
|
|
24182
|
+
--xh-action-fg-rest: var(--xh-color-picker-confirm-trigger-fg, var(--xh-_action-variant-fg-rest));
|
|
24183
|
+
--xh-action-fg-hover: var(--xh-color-picker-confirm-trigger-fg, var(--xh-_action-variant-fg-hover));
|
|
24184
|
+
--xh-action-fg-pressed: var(--xh-color-picker-confirm-trigger-fg, var(--xh-_action-variant-fg-pressed));
|
|
24185
|
+
--xh-action-border-rest: transparent;
|
|
24186
|
+
--xh-action-highlight-rest: transparent;
|
|
24187
|
+
--xh-action-shadow-rest: var(--xh-color-picker-confirm-trigger-shadow, none);
|
|
24188
|
+
--xh-action-shadow-hover: var(--xh-color-picker-confirm-trigger-shadow, none);
|
|
24189
|
+
--xh-action-shadow-pressed: var(--xh-color-picker-confirm-trigger-shadow, none);
|
|
24190
|
+
--xh-action-font-size: var(--xh-text-secondary-size);
|
|
24191
|
+
|
|
24192
|
+
border-width: 0;
|
|
24193
|
+
}
|
|
24194
|
+
|
|
24195
|
+
/* 单选时连接层给的是 hidden 属性;家族那条 display 会把 UA 规则盖掉 */
|
|
24196
|
+
[data-scope='color-picker'][data-part='confirm-trigger'][hidden] {
|
|
24197
|
+
display: none;
|
|
24198
|
+
}
|
|
24199
|
+
|
|
24029
24200
|
/* 预设色板的挂载点,同时充当色板的根节点:color-swatch-picker 那份皮的 root 规则落在
|
|
24030
24201
|
[data-scope='color-swatch-picker'][data-part='root'] 上,而这里没有那个节点,所以根上挂的那几个私有槽
|
|
24031
24202
|
(格子边长、间距、徽标尺寸、语气色、图标尺)与排布得在这儿照抄一遍;格子的皮仍归色板那一份。
|
|
@@ -24109,6 +24280,12 @@
|
|
|
24109
24280
|
outline: var(--xh-stroke-thin) solid ButtonBorder;
|
|
24110
24281
|
outline-offset: calc(-1 * var(--xh-stroke-thin));
|
|
24111
24282
|
}
|
|
24283
|
+
|
|
24284
|
+
/* 标签前的色点画的也是颜色本身:同样退出强制着色,用系统文字色描一圈 */
|
|
24285
|
+
[data-scope='color-picker'][data-part='tag-list'] > [data-scope='tag'][data-part='root'][data-value]::before {
|
|
24286
|
+
forced-color-adjust: none;
|
|
24287
|
+
border-color: CanvasText;
|
|
24288
|
+
}
|
|
24112
24289
|
}
|
|
24113
24290
|
}
|
|
24114
24291
|
|
|
@@ -26140,6 +26317,30 @@
|
|
|
26140
26317
|
display: none;
|
|
26141
26318
|
}
|
|
26142
26319
|
|
|
26320
|
+
/* 整条占位:一段都没填、焦点也不在段上时,段位与分隔符让位给一句占位文字,焦点一进到段上就换回段位。
|
|
26321
|
+
段位只是淡出(仍可聚焦、仍在读屏树里),文字以生成内容压在同一行上、不吃指针,点下去落到底下的段位 */
|
|
26322
|
+
[data-scope='date-field'][data-part='segment-group'][data-placeholder-shown] {
|
|
26323
|
+
position: relative;
|
|
26324
|
+
color: transparent;
|
|
26325
|
+
}
|
|
26326
|
+
|
|
26327
|
+
[data-scope='date-field'][data-part='segment-group'][data-placeholder-shown] > * {
|
|
26328
|
+
opacity: 0;
|
|
26329
|
+
}
|
|
26330
|
+
|
|
26331
|
+
[data-scope='date-field'][data-part='segment-group'][data-placeholder-shown]::before {
|
|
26332
|
+
content: attr(data-placeholder-text);
|
|
26333
|
+
position: absolute;
|
|
26334
|
+
inset-inline: 0;
|
|
26335
|
+
inset-block-start: 50%;
|
|
26336
|
+
overflow: hidden;
|
|
26337
|
+
color: var(--xh-date-field-placeholder-fg, var(--xh-fg-subtle));
|
|
26338
|
+
white-space: nowrap;
|
|
26339
|
+
text-overflow: ellipsis;
|
|
26340
|
+
pointer-events: none;
|
|
26341
|
+
translate: 0 -50%;
|
|
26342
|
+
}
|
|
26343
|
+
|
|
26143
26344
|
[data-scope='date-field'][data-part='segment-group'] > :not([data-scope]) {
|
|
26144
26345
|
color: var(--xh-date-field-literal-fg, var(--xh-fg-subtle));
|
|
26145
26346
|
}
|
|
@@ -26252,6 +26453,15 @@
|
|
|
26252
26453
|
}
|
|
26253
26454
|
|
|
26254
26455
|
@media (forced-colors: active) {
|
|
26456
|
+
/* 整条占位的文字照系统的弱色画;段位让位时的透明字不被强制换色顶回来 */
|
|
26457
|
+
[data-scope='date-field'][data-part='segment-group'][data-placeholder-shown] {
|
|
26458
|
+
forced-color-adjust: none;
|
|
26459
|
+
}
|
|
26460
|
+
|
|
26461
|
+
[data-scope='date-field'][data-part='segment-group'][data-placeholder-shown]::before {
|
|
26462
|
+
color: GrayText;
|
|
26463
|
+
}
|
|
26464
|
+
|
|
26255
26465
|
[data-scope='date-field'][data-part='segment'][data-invalid]:is([data-focus], :focus-visible) {
|
|
26256
26466
|
outline: var(--xh-ring-width) solid Highlight;
|
|
26257
26467
|
outline-offset: var(--xh-ring-offset);
|
|
@@ -26489,11 +26699,69 @@
|
|
|
26489
26699
|
color: var(--xh-date-picker-literal-fg, var(--xh-fg-subtle));
|
|
26490
26700
|
}
|
|
26491
26701
|
|
|
26702
|
+
/* 整条占位:一段都没填、焦点也不在段上时,段位与分隔符让位给一句占位文字,焦点一进到段上就换回段位。
|
|
26703
|
+
段位只是淡出(仍可聚焦、仍在读屏树里),文字以生成内容压在同一行上、不吃指针,点下去落到底下的段位 */
|
|
26704
|
+
[data-scope='date-picker'][data-part='segment-group'][data-placeholder-shown] {
|
|
26705
|
+
position: relative;
|
|
26706
|
+
color: transparent;
|
|
26707
|
+
}
|
|
26708
|
+
|
|
26709
|
+
[data-scope='date-picker'][data-part='segment-group'][data-placeholder-shown] > * {
|
|
26710
|
+
opacity: 0;
|
|
26711
|
+
}
|
|
26712
|
+
|
|
26713
|
+
[data-scope='date-picker'][data-part='segment-group'][data-placeholder-shown]::before {
|
|
26714
|
+
content: attr(data-placeholder-text);
|
|
26715
|
+
position: absolute;
|
|
26716
|
+
inset-inline: 0;
|
|
26717
|
+
inset-block-start: 50%;
|
|
26718
|
+
overflow: hidden;
|
|
26719
|
+
color: var(--xh-date-picker-placeholder-fg, var(--xh-fg-subtle));
|
|
26720
|
+
white-space: nowrap;
|
|
26721
|
+
text-overflow: ellipsis;
|
|
26722
|
+
pointer-events: none;
|
|
26723
|
+
translate: 0 -50%;
|
|
26724
|
+
}
|
|
26725
|
+
|
|
26492
26726
|
/* 容器自己不占 Tab 位、也不承载焦点,环由 control 画,这里不再套一圈 */
|
|
26493
26727
|
[data-scope='date-picker'][data-part='segment-group']:focus-visible {
|
|
26494
26728
|
outline: none;
|
|
26495
26729
|
}
|
|
26496
26730
|
|
|
26731
|
+
/* 多选的标签行:段位让位,选中的日期在盒里排成标签,超过 maxTagCount 的折进 +N。
|
|
26732
|
+
行里每一枚都是 tag(data-scope="tag"),样子归 tag.css;行怎么排、标签怎么进出归标签行家族配方,
|
|
26733
|
+
这里只接使用者的间距槽,并让它像段位那样占满输入行剩下的宽度 */
|
|
26734
|
+
[data-scope='date-picker'][data-part='tag-list'] {
|
|
26735
|
+
--xh-tag-list-gap: var(--xh-date-picker-tag-list-gap, var(--xh-space-1));
|
|
26736
|
+
|
|
26737
|
+
/* 基准取 0:只吃两颗钮剩下的宽度、在自己里面折行;按内容宽算基准的话,盒子会先在钮前面折行,把钮挤到最后一行 */
|
|
26738
|
+
flex: 1 1 0;
|
|
26739
|
+
flex-wrap: wrap;
|
|
26740
|
+
font-size: var(--xh-date-picker-font-size, var(--xh-_date-picker-font-size));
|
|
26741
|
+
}
|
|
26742
|
+
|
|
26743
|
+
/* 日期标签是定长文字,截短了就读不出是哪天:不收缩,排不下就折到下一行(与标签输入同一种排法),
|
|
26744
|
+
盒随行数长高(字段家族的 multi-tag 布局给),到上限后在盒内滚动 */
|
|
26745
|
+
[data-scope='date-picker'][data-part='tag-list'] > [data-scope='tag'][data-part='root'] {
|
|
26746
|
+
flex: none;
|
|
26747
|
+
}
|
|
26748
|
+
|
|
26749
|
+
[data-scope='date-picker'][data-part='control'][data-xh-field-layout='multi-tag'] {
|
|
26750
|
+
max-block-size: var(--xh-date-picker-control-max-h, var(--xh-viewport-h-sm));
|
|
26751
|
+
overflow-y: auto;
|
|
26752
|
+
}
|
|
26753
|
+
|
|
26754
|
+
/* 没有选中时这一行承载整条占位:与单选那条占位同一句文字、同一个颜色槽 */
|
|
26755
|
+
[data-scope='date-picker'][data-part='tag-list'][data-placeholder-shown]::before {
|
|
26756
|
+
content: attr(data-placeholder-text);
|
|
26757
|
+
min-inline-size: 0;
|
|
26758
|
+
overflow: hidden;
|
|
26759
|
+
color: var(--xh-date-picker-placeholder-fg, var(--xh-fg-subtle));
|
|
26760
|
+
white-space: nowrap;
|
|
26761
|
+
text-overflow: ellipsis;
|
|
26762
|
+
pointer-events: none;
|
|
26763
|
+
}
|
|
26764
|
+
|
|
26497
26765
|
/* 两个按钮同一副长相:贴在框内末端的小方钮,不占宽度也不撑高 control。正方视觉盒、inset 圆角、
|
|
26498
26766
|
悬停 100 / 按下 200 与 0.97 按压、粗指针热区、禁用面与 :focus-visible 关环(盒的 :focus-within
|
|
26499
26767
|
已画了一圈)全由 Action Control 的 field-inset ghost 档给,组件只映射既有覆盖槽。
|
|
@@ -26533,10 +26801,11 @@
|
|
|
26533
26801
|
--xh-action-fg-rest: var(--xh-date-picker-action-fg-hover, var(--xh-fg-default));
|
|
26534
26802
|
}
|
|
26535
26803
|
|
|
26536
|
-
/*
|
|
26804
|
+
/* 有值时清空钮顶上来,日历钮让位:两颗并排堆着用户分不清点哪个。
|
|
26805
|
+
多选不让位:段位收起后日历钮是唯一的键盘入口(退格摘标签也在它身上),藏了键盘就进不来 */
|
|
26537
26806
|
[data-scope='date-picker'][data-part='control']:has(
|
|
26538
26807
|
> [data-scope='date-picker'][data-part='clear-trigger']:not([hidden])
|
|
26539
|
-
)
|
|
26808
|
+
):not(:has(> [data-scope='date-picker'][data-part='tag-list']:not([hidden])))
|
|
26540
26809
|
> [data-scope='date-picker'][data-part='trigger'] {
|
|
26541
26810
|
display: none;
|
|
26542
26811
|
}
|
|
@@ -26555,9 +26824,10 @@
|
|
|
26555
26824
|
border-radius: var(--xh-date-picker-content-radius, var(--xh-shape-overlay));
|
|
26556
26825
|
background: var(--xh-date-picker-content-bg, var(--xh-bg-surface));
|
|
26557
26826
|
color: var(--xh-date-picker-content-fg, var(--xh-fg-default));
|
|
26558
|
-
/*
|
|
26827
|
+
/* 日历是定高结构:网格、时间列与确认行都按 px 排,天然高度就是它们的和,缺省不另设上限
|
|
26828
|
+
(按 rem 的滚动面档会随根字号缩小,根字号低于 16px 时确认行就被挤到滚动里);
|
|
26559
26829
|
可用高度是定位引擎算出的视口余量,视口真放不下时再收一截 */
|
|
26560
|
-
max-block-size: min(var(--xh-date-picker-max-h, var(--xh-
|
|
26830
|
+
max-block-size: min(var(--xh-date-picker-max-h, var(--xh-_date-picker-available-h)), var(--xh-_date-picker-available-h));
|
|
26561
26831
|
/* 两轴都滚:块轴放不下时面板内自己竖滚,行内轴放不下时面板内自己横滚,
|
|
26562
26832
|
日历那几块保持各自的天然宽度,不被压 */
|
|
26563
26833
|
overflow: auto;
|
|
@@ -27020,6 +27290,16 @@
|
|
|
27020
27290
|
}
|
|
27021
27291
|
|
|
27022
27292
|
@media (forced-colors: active) {
|
|
27293
|
+
/* 整条占位的文字照系统的弱色画;段位让位时的透明字不被强制换色顶回来 */
|
|
27294
|
+
[data-scope='date-picker'][data-part='segment-group'][data-placeholder-shown] {
|
|
27295
|
+
forced-color-adjust: none;
|
|
27296
|
+
}
|
|
27297
|
+
|
|
27298
|
+
[data-scope='date-picker'][data-part='segment-group'][data-placeholder-shown]::before,
|
|
27299
|
+
[data-scope='date-picker'][data-part='tag-list'][data-placeholder-shown]::before {
|
|
27300
|
+
color: GrayText;
|
|
27301
|
+
}
|
|
27302
|
+
|
|
27023
27303
|
/* 系统接管底色后仍保住末端对号;禁用标记改用系统失效色。 */
|
|
27024
27304
|
[data-scope='date-picker'][data-part='preset']::after,
|
|
27025
27305
|
[data-scope='date-picker'][data-part='time-item']::after {
|
|
@@ -27300,6 +27580,30 @@
|
|
|
27300
27580
|
color: var(--xh-date-range-picker-literal-fg, var(--xh-fg-subtle));
|
|
27301
27581
|
}
|
|
27302
27582
|
|
|
27583
|
+
/* 整条占位:一段都没填、焦点也不在段上时,段位与分隔符让位给一句占位文字,焦点一进到段上就换回段位。
|
|
27584
|
+
段位只是淡出(仍可聚焦、仍在读屏树里),文字以生成内容压在同一行上、不吃指针,点下去落到底下的段位 */
|
|
27585
|
+
[data-scope='date-range-picker'][data-part='segment-group'][data-placeholder-shown] {
|
|
27586
|
+
position: relative;
|
|
27587
|
+
color: transparent;
|
|
27588
|
+
}
|
|
27589
|
+
|
|
27590
|
+
[data-scope='date-range-picker'][data-part='segment-group'][data-placeholder-shown] > * {
|
|
27591
|
+
opacity: 0;
|
|
27592
|
+
}
|
|
27593
|
+
|
|
27594
|
+
[data-scope='date-range-picker'][data-part='segment-group'][data-placeholder-shown]::before {
|
|
27595
|
+
content: attr(data-placeholder-text);
|
|
27596
|
+
position: absolute;
|
|
27597
|
+
inset-inline: 0;
|
|
27598
|
+
inset-block-start: 50%;
|
|
27599
|
+
overflow: hidden;
|
|
27600
|
+
color: var(--xh-date-range-picker-placeholder-fg, var(--xh-fg-subtle));
|
|
27601
|
+
white-space: nowrap;
|
|
27602
|
+
text-overflow: ellipsis;
|
|
27603
|
+
pointer-events: none;
|
|
27604
|
+
translate: 0 -50%;
|
|
27605
|
+
}
|
|
27606
|
+
|
|
27303
27607
|
/* 容器自己不占 Tab 位、也不承载焦点,环由 control 画,这里不再套一圈 */
|
|
27304
27608
|
[data-scope='date-range-picker'][data-part='segment-group']:focus-visible {
|
|
27305
27609
|
outline: none;
|
|
@@ -27366,9 +27670,10 @@
|
|
|
27366
27670
|
border-radius: var(--xh-date-range-picker-content-radius, var(--xh-shape-overlay));
|
|
27367
27671
|
background: var(--xh-date-range-picker-content-bg, var(--xh-bg-surface));
|
|
27368
27672
|
color: var(--xh-date-range-picker-content-fg, var(--xh-fg-default));
|
|
27369
|
-
/*
|
|
27673
|
+
/* 日历是定高结构:网格、时间列与确认行都按 px 排,天然高度就是它们的和,缺省不另设上限
|
|
27674
|
+
(按 rem 的滚动面档会随根字号缩小,根字号低于 16px 时确认行就被挤到滚动里);
|
|
27370
27675
|
可用高度是定位引擎算出的视口余量,视口真放不下时再收一截 */
|
|
27371
|
-
max-block-size: min(var(--xh-date-range-picker-max-h, var(--xh-
|
|
27676
|
+
max-block-size: min(var(--xh-date-range-picker-max-h, var(--xh-_date-range-picker-available-h)), var(--xh-_date-range-picker-available-h));
|
|
27372
27677
|
/* 两轴都滚:块轴放不下时面板内自己竖滚,行内轴放不下时面板内自己横滚,
|
|
27373
27678
|
日历那几块保持各自的天然宽度,不被压 */
|
|
27374
27679
|
overflow: auto;
|
|
@@ -27852,6 +28157,15 @@
|
|
|
27852
28157
|
}
|
|
27853
28158
|
|
|
27854
28159
|
@media (forced-colors: active) {
|
|
28160
|
+
/* 整条占位的文字照系统的弱色画;段位让位时的透明字不被强制换色顶回来 */
|
|
28161
|
+
[data-scope='date-range-picker'][data-part='segment-group'][data-placeholder-shown] {
|
|
28162
|
+
forced-color-adjust: none;
|
|
28163
|
+
}
|
|
28164
|
+
|
|
28165
|
+
[data-scope='date-range-picker'][data-part='segment-group'][data-placeholder-shown]::before {
|
|
28166
|
+
color: GrayText;
|
|
28167
|
+
}
|
|
28168
|
+
|
|
27855
28169
|
/* 系统接管底色后仍保住末端对号;禁用标记改用系统失效色。 */
|
|
27856
28170
|
[data-scope='date-range-picker'][data-part='preset']::after,
|
|
27857
28171
|
[data-scope='date-range-picker'][data-part='time-item']::after {
|
|
@@ -29215,6 +29529,10 @@
|
|
|
29215
29529
|
display: flex;
|
|
29216
29530
|
flex-direction: column;
|
|
29217
29531
|
gap: var(--xh-field-gap, var(--xh-space-1));
|
|
29532
|
+
/* 字段族控件放进字段即铺满字段宽:字段的宽由表单的列给,控件跟着列走,
|
|
29533
|
+
不必逐个组件在根上写 inline-size: 100%。单独摆放的控件仍是 16rem 缺省宽;
|
|
29534
|
+
单类钉宽(--xh-<组件>-control-w)照旧压过这一条 */
|
|
29535
|
+
--xh-control-w: 100%;
|
|
29218
29536
|
}
|
|
29219
29537
|
|
|
29220
29538
|
/* 表单横排(标签左置):字段转两列网格,标签列宽由表单的 --xh-form-label-w 统一给,
|
|
@@ -29821,6 +30139,14 @@
|
|
|
29821
30139
|
flex-flow: row wrap;
|
|
29822
30140
|
align-items: start;
|
|
29823
30141
|
column-gap: var(--xh-form-inline-gap, var(--xh-space-4));
|
|
30142
|
+
/* 一行流里字段按内容收,没有列宽可铺:在表单根上取下此处的字段缺省宽,交给下面的字段还原 */
|
|
30143
|
+
--xh-_form-inline-control-w: var(--xh-control-w);
|
|
30144
|
+
}
|
|
30145
|
+
|
|
30146
|
+
/* 字段会把里面的控件铺满字段宽,而一行流的字段宽正是由控件撑出来的,两者互相指望就塌成内容宽;
|
|
30147
|
+
这一档的字段还原成表单根上的缺省宽 */
|
|
30148
|
+
[data-scope='form'][data-part='root'][data-layout='inline'] [data-scope='field'][data-part='root'] {
|
|
30149
|
+
--xh-control-w: var(--xh-_form-inline-control-w);
|
|
29824
30150
|
}
|
|
29825
30151
|
|
|
29826
30152
|
/* 一列是网格档的缺省,这里从两列起逐档写 */
|
|
@@ -34340,7 +34666,7 @@
|
|
|
34340
34666
|
}
|
|
34341
34667
|
|
|
34342
34668
|
[data-scope='notification'][data-part='group'][data-stacked][data-preset='toast'] {
|
|
34343
|
-
inline-size: min(var(--xh-notification-item-w,
|
|
34669
|
+
inline-size: min(var(--xh-notification-item-w, var(--xh-overlay-toast-w)), calc(100vw - var(--xh-space-8)));
|
|
34344
34670
|
}
|
|
34345
34671
|
|
|
34346
34672
|
[data-scope='notification'][data-part='group'][data-stacked][data-placement^='bottom'] {
|
|
@@ -34449,7 +34775,7 @@
|
|
|
34449
34775
|
display: flex;
|
|
34450
34776
|
align-items: flex-start;
|
|
34451
34777
|
column-gap: var(--xh-notification-item-gap, var(--xh-space-2));
|
|
34452
|
-
inline-size: var(--xh-notification-item-w,
|
|
34778
|
+
inline-size: var(--xh-notification-item-w, var(--xh-overlay-toast-w));
|
|
34453
34779
|
padding-block: var(--xh-notification-item-py, var(--xh-space-3));
|
|
34454
34780
|
padding-inline: var(--xh-notification-item-px, var(--xh-space-4));
|
|
34455
34781
|
font-size: var(--xh-notification-item-font-size, var(--xh-text-label-size));
|
|
@@ -34734,8 +35060,14 @@
|
|
|
34734
35060
|
);
|
|
34735
35061
|
}
|
|
34736
35062
|
|
|
35063
|
+
/* 正文有上限:推一段长文(公告全文)进来时卡片不被撑到整屏高——摞是整面视口的定位面、不吃指针也不裁切,
|
|
35064
|
+
撑出视口的那截既看不到也滚不到。超出的部分在正文自己里面滚,标题与操作钮留在卡片上;
|
|
35065
|
+
滚到头不把滚动量传给页面 */
|
|
34737
35066
|
[data-scope='notification'][data-part='item-description'] {
|
|
34738
35067
|
margin: 0;
|
|
35068
|
+
max-block-size: var(--xh-notification-description-max-h, var(--xh-viewport-h-md));
|
|
35069
|
+
overflow-y: auto;
|
|
35070
|
+
overscroll-behavior: contain;
|
|
34739
35071
|
color: var(--xh-notification-description-fg, var(--xh-fg-muted));
|
|
34740
35072
|
font-size: var(--xh-notification-description-font-size, var(--xh-text-secondary-size));
|
|
34741
35073
|
}
|
|
@@ -42500,6 +42832,23 @@
|
|
|
42500
42832
|
user-select: none;
|
|
42501
42833
|
}
|
|
42502
42834
|
|
|
42835
|
+
/* 列对齐:data-align 控制列头与数据格的文本与内容对齐方向;
|
|
42836
|
+
显式写出三档以便 start 能重置自定义皮肤里可能存在的非默认对齐 */
|
|
42837
|
+
[data-scope='table']:is([data-part='column-header'], [data-part='cell'])[data-align='start'] {
|
|
42838
|
+
text-align: start;
|
|
42839
|
+
justify-content: start;
|
|
42840
|
+
}
|
|
42841
|
+
|
|
42842
|
+
[data-scope='table']:is([data-part='column-header'], [data-part='cell'])[data-align='center'] {
|
|
42843
|
+
text-align: center;
|
|
42844
|
+
justify-content: center;
|
|
42845
|
+
}
|
|
42846
|
+
|
|
42847
|
+
[data-scope='table']:is([data-part='column-header'], [data-part='cell'])[data-align='end'] {
|
|
42848
|
+
text-align: end;
|
|
42849
|
+
justify-content: end;
|
|
42850
|
+
}
|
|
42851
|
+
|
|
42503
42852
|
/* 列名是列头里唯一可收窄的一格:flex: 1 吃掉余量、把排序钮 / 列宽把手推到行尾,min-inline-size: 0 让它在
|
|
42504
42853
|
窄列上收得下去并出省略号。列名不能裸写成文本节点:flex 行里的裸文本是匿名 flex item,min-inline-size 取 auto
|
|
42505
42854
|
(nowrap 文本的 min-content)缩不下去,96px 的列配一串长列名时定尺的把手连同 auto 外边距一起被挤出列头盒、
|
|
@@ -45451,6 +45800,27 @@
|
|
|
45451
45800
|
display: none;
|
|
45452
45801
|
}
|
|
45453
45802
|
|
|
45803
|
+
/* 多选的标签行:段位让位,选中的时刻在盒里排成标签,超过 maxTagCount 的折进 +N。
|
|
45804
|
+
行里每一枚都是 tag(data-scope="tag"),样子归 tag.css;行怎么排、标签怎么进出归标签行家族配方。
|
|
45805
|
+
基准取 0:只吃两颗钮剩下的宽度、在自己里面折行;按内容宽算基准的话,盒子会先在钮前面折行,把钮挤到最后一行 */
|
|
45806
|
+
[data-scope='time-picker'][data-part='tag-list'] {
|
|
45807
|
+
--xh-tag-list-gap: var(--xh-time-picker-tag-list-gap, var(--xh-space-1));
|
|
45808
|
+
|
|
45809
|
+
flex: 1 1 0;
|
|
45810
|
+
flex-wrap: wrap;
|
|
45811
|
+
}
|
|
45812
|
+
|
|
45813
|
+
/* 时刻标签是定长文字,截短了就读不出是几点:不收缩,排不下就折到下一行(与标签输入同一种排法),
|
|
45814
|
+
盒随行数长高(字段家族的 multi-tag 布局给),到上限后在盒内滚动 */
|
|
45815
|
+
[data-scope='time-picker'][data-part='tag-list'] > [data-scope='tag'][data-part='root'] {
|
|
45816
|
+
flex: none;
|
|
45817
|
+
}
|
|
45818
|
+
|
|
45819
|
+
[data-scope='time-picker'][data-part='control'][data-xh-field-layout='multi-tag'] {
|
|
45820
|
+
max-block-size: var(--xh-time-picker-control-max-h, var(--xh-viewport-h-sm));
|
|
45821
|
+
overflow-y: auto;
|
|
45822
|
+
}
|
|
45823
|
+
|
|
45454
45824
|
[data-scope='time-picker'][data-part='segment-group'] > :not([data-scope]) {
|
|
45455
45825
|
color: var(--xh-time-picker-literal-fg, var(--xh-fg-subtle));
|
|
45456
45826
|
}
|
|
@@ -45556,10 +45926,11 @@
|
|
|
45556
45926
|
--xh-action-fg-rest: var(--xh-time-picker-action-fg-hover, var(--xh-fg-default));
|
|
45557
45927
|
}
|
|
45558
45928
|
|
|
45559
|
-
/*
|
|
45929
|
+
/* 有值时清空钮顶上来,展开钮让位:两颗并排堆着用户分不清点哪个。
|
|
45930
|
+
多选不让位:段位收起后展开钮是唯一的键盘入口(退格摘标签也在它身上),藏了键盘就进不来 */
|
|
45560
45931
|
[data-scope='time-picker'][data-part='control']:has(
|
|
45561
45932
|
> [data-scope='time-picker'][data-part='clear-trigger']:not([hidden])
|
|
45562
|
-
)
|
|
45933
|
+
):not(:has(> [data-scope='time-picker'][data-part='tag-list']:not([hidden])))
|
|
45563
45934
|
> [data-scope='time-picker'][data-part='trigger'] {
|
|
45564
45935
|
display: none;
|
|
45565
45936
|
}
|
|
@@ -45609,6 +45980,40 @@
|
|
|
45609
45980
|
animation: xh-overlay-slide-out var(--xh-motion-duration-exit) var(--xh-motion-ease-exit) forwards;
|
|
45610
45981
|
}
|
|
45611
45982
|
|
|
45983
|
+
/* 「添加」沉到各列的右下角:它是多选时整块面板的出口,不跟列顶对齐 */
|
|
45984
|
+
[data-scope='time-picker'][data-part='content'] > [data-scope='time-picker'][data-part='confirm-trigger'] {
|
|
45985
|
+
flex: none;
|
|
45986
|
+
align-self: flex-end;
|
|
45987
|
+
margin-inline-start: var(--xh-time-picker-confirm-trigger-gap, var(--xh-space-1));
|
|
45988
|
+
}
|
|
45989
|
+
|
|
45990
|
+
/* 「添加」是面板里唯一的主要动作:品牌实心、悬停 / 按下与 0.97 按压、焦点环全由 Action Control 的
|
|
45991
|
+
text solid 档给;槽名统一按部件取 --xh-time-picker-confirm-trigger-*,只映射到家族桥接槽 */
|
|
45992
|
+
[data-scope='time-picker'][data-part='confirm-trigger'] {
|
|
45993
|
+
--xh-action-visual-size: var(--xh-time-picker-confirm-trigger-h, var(--xh-_action-profile-visual-size));
|
|
45994
|
+
--xh-action-padding-inline: var(--xh-time-picker-confirm-trigger-px, var(--xh-_action-profile-padding-inline));
|
|
45995
|
+
--xh-action-radius: var(--xh-time-picker-confirm-trigger-radius, var(--xh-shape-control));
|
|
45996
|
+
--xh-action-bg-rest: var(--xh-time-picker-confirm-trigger-bg, var(--xh-_action-variant-bg-rest));
|
|
45997
|
+
--xh-action-bg-hover: var(--xh-time-picker-confirm-trigger-bg-hover, var(--xh-_action-variant-bg-hover));
|
|
45998
|
+
--xh-action-bg-pressed: var(--xh-time-picker-confirm-trigger-bg-active, var(--xh-_action-variant-bg-pressed));
|
|
45999
|
+
--xh-action-fg-rest: var(--xh-time-picker-confirm-trigger-fg, var(--xh-_action-variant-fg-rest));
|
|
46000
|
+
--xh-action-fg-hover: var(--xh-time-picker-confirm-trigger-fg, var(--xh-_action-variant-fg-hover));
|
|
46001
|
+
--xh-action-fg-pressed: var(--xh-time-picker-confirm-trigger-fg, var(--xh-_action-variant-fg-pressed));
|
|
46002
|
+
--xh-action-border-rest: transparent;
|
|
46003
|
+
--xh-action-highlight-rest: transparent;
|
|
46004
|
+
--xh-action-shadow-rest: var(--xh-time-picker-confirm-trigger-shadow, none);
|
|
46005
|
+
--xh-action-shadow-hover: var(--xh-time-picker-confirm-trigger-shadow, none);
|
|
46006
|
+
--xh-action-shadow-pressed: var(--xh-time-picker-confirm-trigger-shadow, none);
|
|
46007
|
+
--xh-action-font-size: var(--xh-text-secondary-size);
|
|
46008
|
+
|
|
46009
|
+
border-width: 0;
|
|
46010
|
+
}
|
|
46011
|
+
|
|
46012
|
+
/* 单选时连接层给的是 hidden 属性;家族那条 display 会把 UA 规则盖掉 */
|
|
46013
|
+
[data-scope='time-picker'][data-part='confirm-trigger'][hidden] {
|
|
46014
|
+
display: none;
|
|
46015
|
+
}
|
|
46016
|
+
|
|
45612
46017
|
/* 快捷选项也是一列,与时分秒那几列并排,排在行内起始一侧 */
|
|
45613
46018
|
[data-scope='time-picker'][data-part='preset-group'] {
|
|
45614
46019
|
display: flex;
|
|
@@ -49502,26 +49907,88 @@
|
|
|
49502
49907
|
}
|
|
49503
49908
|
|
|
49504
49909
|
/*
|
|
49505
|
-
*
|
|
49506
|
-
*
|
|
49910
|
+
* 连接线:父节点展开箭头的中线向下引一道竖线,每个子节点从竖线横出一段接到自己行首(├),
|
|
49911
|
+
* 最后一个子节点的竖线止于它那一行的中线(└),层级深时一眼看得出谁挂在谁下面。
|
|
49912
|
+
* 线由每个子节点自己画:子节点的行画「这一段竖线 + 横出的那一段」,展开着的非末位分支再由它的子层
|
|
49913
|
+
* 把竖线接过它整棵子树,交给下一个兄弟。子节点之间、分支行与子层之间的间距由线向上下伸出补齐,竖线不断开。
|
|
49914
|
+
* 只画在竖排的子层里:顶层节点没有父节点可连,横排的末端层没有行首可接。
|
|
49915
|
+
* 首个与末位子节点按子层里的结构次序认:子层里只放节点,收起的子树整块不显示、不影响次序。
|
|
49507
49916
|
* 它是内部分隔的一种,颜色取 border-subtle;行悬停与选中换面时线压在面上照样看得见
|
|
49508
49917
|
*/
|
|
49509
49918
|
[data-scope='tree'][data-part='tree'][data-lines] [data-scope='tree'][data-part='branch-content'] {
|
|
49510
49919
|
position: relative;
|
|
49511
49920
|
}
|
|
49512
49921
|
|
|
49513
|
-
|
|
49922
|
+
/* 竖线落在父节点展开箭头的中线上:父行的行首内边距加半个箭头盒,换算到缩进了一格的子节点坐标里。
|
|
49923
|
+
向上伸出的量补的是上方那段间距(首个子节点补分支行与子层之间的那段),向下补到下一个兄弟 */
|
|
49924
|
+
[data-scope='tree'][data-part='tree'][data-lines] [data-scope='tree'][data-part='branch-content'][data-orientation='vertical'] > [data-scope='tree'][data-part='item'],
|
|
49925
|
+
[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'] {
|
|
49926
|
+
--xh-_tree-line-x: calc(
|
|
49927
|
+
var(--xh-tree-row-px, var(--xh-_tree-row-px)) +
|
|
49928
|
+
var(--xh-_tree-indicator-size) / 2 -
|
|
49929
|
+
var(--xh-stroke-thin) / 2 -
|
|
49930
|
+
var(--xh-tree-indent, var(--xh-_tree-indent))
|
|
49931
|
+
);
|
|
49932
|
+
--xh-_tree-line-top: 0px;
|
|
49933
|
+
--xh-_tree-line-bottom: var(--xh-tree-branch-content-gap, var(--xh-list-option-gap));
|
|
49934
|
+
|
|
49935
|
+
position: relative;
|
|
49936
|
+
}
|
|
49937
|
+
|
|
49938
|
+
[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,
|
|
49939
|
+
[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'] {
|
|
49940
|
+
--xh-_tree-line-top: var(--xh-tree-branch-gap, var(--xh-list-option-gap));
|
|
49941
|
+
}
|
|
49942
|
+
|
|
49943
|
+
/* 展开着的非末位分支:行下面先是它自己的子层,竖线只伸到子层顶上,余下那段由子层接着画 */
|
|
49944
|
+
[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'] {
|
|
49945
|
+
--xh-_tree-line-bottom: var(--xh-tree-branch-gap, var(--xh-list-option-gap));
|
|
49946
|
+
}
|
|
49947
|
+
|
|
49948
|
+
[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,
|
|
49949
|
+
[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 {
|
|
49514
49950
|
content: '';
|
|
49515
49951
|
position: absolute;
|
|
49516
|
-
inset-block:
|
|
49517
|
-
|
|
49952
|
+
inset-block: calc(var(--xh-_tree-line-top) * -1) calc(var(--xh-_tree-line-bottom) * -1);
|
|
49953
|
+
inset-inline-start: var(--xh-_tree-line-x);
|
|
49954
|
+
/* 分支横出到展开箭头盒的起点;叶子没有箭头,横线穿过占位那一格接到正文前 */
|
|
49955
|
+
inline-size: calc(var(--xh-tree-row-px, var(--xh-_tree-row-px)) - var(--xh-_tree-line-x));
|
|
49956
|
+
border-inline-start: var(--xh-stroke-thin) solid var(--xh-tree-line-color, var(--xh-border-subtle));
|
|
49957
|
+
/* 横出的那段落在行的中线:线盒上下伸出的量不对称时按差值的一半补回 */
|
|
49958
|
+
background: linear-gradient(var(--xh-tree-line-color, var(--xh-border-subtle)), var(--xh-tree-line-color, var(--xh-border-subtle)))
|
|
49959
|
+
0 calc(50% + (var(--xh-_tree-line-top) - var(--xh-_tree-line-bottom)) / 2) / 100% var(--xh-stroke-thin) no-repeat;
|
|
49960
|
+
pointer-events: none;
|
|
49961
|
+
}
|
|
49962
|
+
|
|
49963
|
+
[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 {
|
|
49964
|
+
inline-size: calc(
|
|
49965
|
+
var(--xh-tree-row-px, var(--xh-_tree-row-px)) +
|
|
49966
|
+
var(--xh-_tree-indicator-size) -
|
|
49967
|
+
var(--xh-_tree-line-x)
|
|
49968
|
+
);
|
|
49969
|
+
}
|
|
49970
|
+
|
|
49971
|
+
/* 最后一个子节点:竖线止于行的中线并在那里拐向行首(└),下面不再有兄弟要接 */
|
|
49972
|
+
[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,
|
|
49973
|
+
[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 {
|
|
49974
|
+
inset-block-end: calc(50% - var(--xh-stroke-thin) / 2);
|
|
49975
|
+
border-block-end: var(--xh-stroke-thin) solid var(--xh-tree-line-color, var(--xh-border-subtle));
|
|
49976
|
+
background: none;
|
|
49977
|
+
}
|
|
49978
|
+
|
|
49979
|
+
/* 展开着的非末位分支:它的子层把父节点那道竖线接过整棵子树,一直伸到下一个兄弟。
|
|
49980
|
+
子层的盒与分支同起点(缩进是子层自己的内边距),竖线位置与分支行里那一段相同 */
|
|
49981
|
+
[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 {
|
|
49982
|
+
content: '';
|
|
49983
|
+
position: absolute;
|
|
49984
|
+
inset-block: 0 calc(var(--xh-tree-branch-content-gap, var(--xh-list-option-gap)) * -1);
|
|
49518
49985
|
inset-inline-start: calc(
|
|
49519
49986
|
var(--xh-tree-row-px, var(--xh-_tree-row-px)) +
|
|
49520
49987
|
var(--xh-tree-indicator-size, var(--xh-_tree-indicator)) / 2 -
|
|
49521
|
-
var(--xh-stroke-thin) / 2
|
|
49988
|
+
var(--xh-stroke-thin) / 2 -
|
|
49989
|
+
var(--xh-tree-indent, var(--xh-_tree-indent))
|
|
49522
49990
|
);
|
|
49523
|
-
inline-
|
|
49524
|
-
background: var(--xh-tree-line-color, var(--xh-border-subtle));
|
|
49991
|
+
border-inline-start: var(--xh-stroke-thin) solid var(--xh-tree-line-color, var(--xh-border-subtle));
|
|
49525
49992
|
pointer-events: none;
|
|
49526
49993
|
}
|
|
49527
49994
|
|
|
@@ -49750,10 +50217,18 @@
|
|
|
49750
50217
|
}
|
|
49751
50218
|
}
|
|
49752
50219
|
|
|
49753
|
-
/*
|
|
50220
|
+
/* 强制色:连接线的横段是一块渐变底色、竖段是描边,系统色下一个被抹掉、一个被换成文字色;
|
|
50221
|
+
两段都写 GrayText,并只让连接线不参与强制换色 */
|
|
49754
50222
|
@media (forced-colors: active) {
|
|
49755
|
-
[data-scope='tree'][data-part='tree'][data-lines] [data-scope='tree'][data-part='branch-content']::before
|
|
49756
|
-
|
|
50223
|
+
[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,
|
|
50224
|
+
[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 {
|
|
50225
|
+
border-color: GrayText;
|
|
50226
|
+
background-image: linear-gradient(GrayText, GrayText);
|
|
50227
|
+
forced-color-adjust: none;
|
|
50228
|
+
}
|
|
50229
|
+
|
|
50230
|
+
[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 {
|
|
50231
|
+
border-color: GrayText;
|
|
49757
50232
|
forced-color-adjust: none;
|
|
49758
50233
|
}
|
|
49759
50234
|
}
|