@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.unlayered.css
CHANGED
|
@@ -5424,6 +5424,104 @@
|
|
|
5424
5424
|
inset-inline-end: max(var(--xh-_float-button-offset), env(safe-area-inset-left), env(safe-area-inset-right));
|
|
5425
5425
|
}
|
|
5426
5426
|
|
|
5427
|
+
/* —— 位置 ——
|
|
5428
|
+
拖到别处、或作者给了位置时,角落那两条贴边里有一条换掉:data-placement 由连接层按位置推出
|
|
5429
|
+
(离触发器最近的恒是视口的那条边、展开组朝页面中间长),这里只换沿边的那一条。
|
|
5430
|
+
百分比按固定定位的包含块(视口去掉滚动条)量,与连接层量的视口同一块;
|
|
5431
|
+
夹取的上下界与四角同样和安全区取大的一头,比例再怎么写,钮也不会压进刘海与横条。
|
|
5432
|
+
触发器边长取它自己那一档(使用者槽在前):沿边的比例量的是触发器中心 */
|
|
5433
|
+
[data-scope='float-button'][data-part='root'] {
|
|
5434
|
+
--xh-_float-button-span: var(--xh-float-button-size, var(--xh-_float-button-size));
|
|
5435
|
+
}
|
|
5436
|
+
|
|
5437
|
+
/* 贴左右边:上下按比例,锚在离触发器近的那一头 */
|
|
5438
|
+
[data-scope='float-button'][data-part='root'][data-edge^='inline'][data-placement^='top'] {
|
|
5439
|
+
inset-block-start: clamp(
|
|
5440
|
+
max(var(--xh-_float-button-offset), env(safe-area-inset-top)),
|
|
5441
|
+
calc(var(--xh-_float-button-ratio) * 100% - var(--xh-_float-button-span) / 2),
|
|
5442
|
+
calc(100% - var(--xh-_float-button-span) - max(var(--xh-_float-button-offset), env(safe-area-inset-bottom)))
|
|
5443
|
+
);
|
|
5444
|
+
}
|
|
5445
|
+
|
|
5446
|
+
[data-scope='float-button'][data-part='root'][data-edge^='inline'][data-placement^='bottom'] {
|
|
5447
|
+
inset-block-end: clamp(
|
|
5448
|
+
max(var(--xh-_float-button-offset), env(safe-area-inset-bottom)),
|
|
5449
|
+
calc((1 - var(--xh-_float-button-ratio)) * 100% - var(--xh-_float-button-span) / 2),
|
|
5450
|
+
calc(100% - var(--xh-_float-button-span) - max(var(--xh-_float-button-offset), env(safe-area-inset-top)))
|
|
5451
|
+
);
|
|
5452
|
+
}
|
|
5453
|
+
|
|
5454
|
+
/* 贴上下边:行内方向按比例,从行首量起 */
|
|
5455
|
+
[data-scope='float-button'][data-part='root'][data-edge^='block'][data-placement$='-start'] {
|
|
5456
|
+
inset-inline-start: clamp(
|
|
5457
|
+
max(var(--xh-_float-button-offset), env(safe-area-inset-left), env(safe-area-inset-right)),
|
|
5458
|
+
calc(var(--xh-_float-button-ratio) * 100% - var(--xh-_float-button-span) / 2),
|
|
5459
|
+
calc(100% - var(--xh-_float-button-span) - max(var(--xh-_float-button-offset), env(safe-area-inset-left), env(safe-area-inset-right)))
|
|
5460
|
+
);
|
|
5461
|
+
}
|
|
5462
|
+
|
|
5463
|
+
[data-scope='float-button'][data-part='root'][data-edge^='block'][data-placement$='-end'] {
|
|
5464
|
+
inset-inline-end: clamp(
|
|
5465
|
+
max(var(--xh-_float-button-offset), env(safe-area-inset-left), env(safe-area-inset-right)),
|
|
5466
|
+
calc((1 - var(--xh-_float-button-ratio)) * 100% - var(--xh-_float-button-span) / 2),
|
|
5467
|
+
calc(100% - var(--xh-_float-button-span) - max(var(--xh-_float-button-offset), env(safe-area-inset-left), env(safe-area-inset-right)))
|
|
5468
|
+
);
|
|
5469
|
+
}
|
|
5470
|
+
|
|
5471
|
+
/* 停在一点、或正跟着指针走:坐标是触发器左上角的物理像素,横向一律从左边量,不随书写方向翻。
|
|
5472
|
+
竖向锚在离触发器近的那一头:朝下长的锚上沿,朝上长的锚下沿,展开组冒出来时触发器不挪窝。
|
|
5473
|
+
停着的点仍夹在视口里(视口变小时不跑出去);跟手的坐标由连接层夹好,这里原样用 */
|
|
5474
|
+
[data-scope='float-button'][data-part='root'][data-point][data-placement] {
|
|
5475
|
+
inset-inline: auto;
|
|
5476
|
+
/* stylelint-disable-next-line property-disallowed-list -- 停点由连接层按指针的物理坐标写成 x,横向从左边量、不随书写方向翻 */
|
|
5477
|
+
left: clamp(
|
|
5478
|
+
max(var(--xh-_float-button-offset), env(safe-area-inset-left)),
|
|
5479
|
+
var(--xh-_float-button-x),
|
|
5480
|
+
calc(100% - var(--xh-_float-button-span) - max(var(--xh-_float-button-offset), env(safe-area-inset-right)))
|
|
5481
|
+
);
|
|
5482
|
+
}
|
|
5483
|
+
|
|
5484
|
+
[data-scope='float-button'][data-part='root'][data-point][data-placement^='top'] {
|
|
5485
|
+
top: clamp(
|
|
5486
|
+
max(var(--xh-_float-button-offset), env(safe-area-inset-top)),
|
|
5487
|
+
var(--xh-_float-button-y),
|
|
5488
|
+
calc(100% - var(--xh-_float-button-span) - max(var(--xh-_float-button-offset), env(safe-area-inset-bottom)))
|
|
5489
|
+
);
|
|
5490
|
+
}
|
|
5491
|
+
|
|
5492
|
+
[data-scope='float-button'][data-part='root'][data-point][data-placement^='bottom'] {
|
|
5493
|
+
bottom: clamp(
|
|
5494
|
+
max(var(--xh-_float-button-offset), env(safe-area-inset-bottom)),
|
|
5495
|
+
calc(100% - var(--xh-_float-button-y) - var(--xh-_float-button-span)),
|
|
5496
|
+
calc(100% - var(--xh-_float-button-span) - max(var(--xh-_float-button-offset), env(safe-area-inset-top)))
|
|
5497
|
+
);
|
|
5498
|
+
}
|
|
5499
|
+
|
|
5500
|
+
/* 跟手排在贴边与停点之后:拖动与落定途中压过提交了的位置 */
|
|
5501
|
+
[data-scope='float-button'][data-part='root'][data-moving][data-placement] {
|
|
5502
|
+
inset-inline: auto;
|
|
5503
|
+
/* stylelint-disable-next-line property-disallowed-list -- 同上:跟手坐标是指针的物理 x */
|
|
5504
|
+
left: var(--xh-_float-button-x);
|
|
5505
|
+
}
|
|
5506
|
+
|
|
5507
|
+
[data-scope='float-button'][data-part='root'][data-moving][data-placement^='top'] {
|
|
5508
|
+
top: var(--xh-_float-button-y);
|
|
5509
|
+
}
|
|
5510
|
+
|
|
5511
|
+
[data-scope='float-button'][data-part='root'][data-moving][data-placement^='bottom'] {
|
|
5512
|
+
bottom: calc(100% - var(--xh-_float-button-y) - var(--xh-_float-button-span));
|
|
5513
|
+
}
|
|
5514
|
+
|
|
5515
|
+
/* 能拖时触屏手指在触发器上的移动归拖动,不让浏览器拿去滚页面;光标提示能抓、正抓着 */
|
|
5516
|
+
[data-scope='float-button'][data-part='root'][data-draggable] [data-scope='float-button'][data-part='trigger'] {
|
|
5517
|
+
touch-action: none;
|
|
5518
|
+
cursor: grab;
|
|
5519
|
+
}
|
|
5520
|
+
|
|
5521
|
+
[data-scope='float-button'][data-part='root'][data-dragging] [data-scope='float-button'][data-part='trigger'] {
|
|
5522
|
+
cursor: grabbing;
|
|
5523
|
+
}
|
|
5524
|
+
|
|
5427
5525
|
/* —— 尺寸:原生动作项与触发器的 floating 档逐档同表 —— */
|
|
5428
5526
|
[data-scope='float-button'][data-part='root'][data-size='sm'] {
|
|
5429
5527
|
--xh-_float-button-size: var(--xh-control-box-md);
|
|
@@ -23501,6 +23599,46 @@
|
|
|
23501
23599
|
display: none;
|
|
23502
23600
|
}
|
|
23503
23601
|
|
|
23602
|
+
/* 多选的标签行:选中的颜色在盒里排成标签,超过 maxTagCount 的折进 +N。
|
|
23603
|
+
行里每一枚都是 tag(data-scope="tag"),样子归 tag.css;行怎么排、标签怎么进出归标签行家族配方。
|
|
23604
|
+
基准取 0:只吃触发钮剩下的宽度、在自己里面折行;按内容宽算基准的话,盒子会先在钮前面折行,把钮挤到最后一行 */
|
|
23605
|
+
[data-scope='color-picker'][data-part='tag-list'] {
|
|
23606
|
+
--xh-tag-list-gap: var(--xh-color-picker-tag-list-gap, var(--xh-space-1));
|
|
23607
|
+
|
|
23608
|
+
flex: 1 1 0;
|
|
23609
|
+
flex-wrap: wrap;
|
|
23610
|
+
}
|
|
23611
|
+
|
|
23612
|
+
/* 颜色标签是定长的值串,截短了就读不出是哪个颜色:不收缩,排不下就折到下一行,
|
|
23613
|
+
盒随行数长高(字段家族的 multi-tag 布局给),到上限后在盒内滚动 */
|
|
23614
|
+
[data-scope='color-picker'][data-part='tag-list'] > [data-scope='tag'][data-part='root'] {
|
|
23615
|
+
flex: none;
|
|
23616
|
+
}
|
|
23617
|
+
|
|
23618
|
+
/* 每枚标签前一个色点,颜色由连接层写进内联私有槽;+N 那一枚没有 data-value,不画。
|
|
23619
|
+
白色与近底色的颜色靠一圈默认描边从标签底上分出来 */
|
|
23620
|
+
[data-scope='color-picker'][data-part='tag-list'] > [data-scope='tag'][data-part='root'][data-value]::before {
|
|
23621
|
+
flex: none;
|
|
23622
|
+
box-sizing: border-box;
|
|
23623
|
+
inline-size: var(--xh-color-picker-tag-dot-size, var(--xh-control-indicator-sm));
|
|
23624
|
+
block-size: var(--xh-color-picker-tag-dot-size, var(--xh-control-indicator-sm));
|
|
23625
|
+
border: var(--xh-stroke-thin) solid var(--xh-color-picker-tag-dot-border, var(--xh-border-default));
|
|
23626
|
+
border-radius: var(--xh-shape-circle);
|
|
23627
|
+
background-color: var(--xh-_color-picker-tag-color, transparent);
|
|
23628
|
+
content: '';
|
|
23629
|
+
print-color-adjust: exact;
|
|
23630
|
+
}
|
|
23631
|
+
|
|
23632
|
+
[data-scope='color-picker'][data-part='control'][data-xh-field-layout='multi-tag'] {
|
|
23633
|
+
max-block-size: var(--xh-color-picker-control-max-h, var(--xh-viewport-h-sm));
|
|
23634
|
+
overflow-y: auto;
|
|
23635
|
+
}
|
|
23636
|
+
|
|
23637
|
+
/* 多选时值文字让位,触发钮只剩一颗显示工作色的色块:不再占满剩余宽度,标签行吃掉余下的位置 */
|
|
23638
|
+
[data-scope='color-picker'][data-part='control'][data-xh-field-layout='multi-tag'] > [data-scope='color-picker'][data-part='trigger'] {
|
|
23639
|
+
flex: none;
|
|
23640
|
+
}
|
|
23641
|
+
|
|
23504
23642
|
/* 盒内那颗可聚焦的按钮:不画描边不铺底也不自带高度,只占满剩余宽度、排布色块与值文本 */
|
|
23505
23643
|
[data-scope='color-picker'][data-part='trigger'] {
|
|
23506
23644
|
display: inline-flex;
|
|
@@ -23838,6 +23976,39 @@
|
|
|
23838
23976
|
color: var(--xh-fg-disabled);
|
|
23839
23977
|
}
|
|
23840
23978
|
|
|
23979
|
+
/* 「添加」沉到面板的行尾:它是多选时整块面板的出口,不跟取色面左对齐 */
|
|
23980
|
+
[data-scope='color-picker'][data-part='content'] > [data-scope='color-picker'][data-part='confirm-trigger'] {
|
|
23981
|
+
flex: none;
|
|
23982
|
+
align-self: flex-end;
|
|
23983
|
+
}
|
|
23984
|
+
|
|
23985
|
+
/* 「添加」是面板里唯一的主要动作:品牌实心、悬停 / 按下与 0.97 按压、焦点环全由 Action Control 的
|
|
23986
|
+
text solid 档给;槽名统一按部件取 --xh-color-picker-confirm-trigger-*,只映射到家族桥接槽 */
|
|
23987
|
+
[data-scope='color-picker'][data-part='confirm-trigger'] {
|
|
23988
|
+
--xh-action-visual-size: var(--xh-color-picker-confirm-trigger-h, var(--xh-_action-profile-visual-size));
|
|
23989
|
+
--xh-action-padding-inline: var(--xh-color-picker-confirm-trigger-px, var(--xh-_action-profile-padding-inline));
|
|
23990
|
+
--xh-action-radius: var(--xh-color-picker-confirm-trigger-radius, var(--xh-shape-control));
|
|
23991
|
+
--xh-action-bg-rest: var(--xh-color-picker-confirm-trigger-bg, var(--xh-_action-variant-bg-rest));
|
|
23992
|
+
--xh-action-bg-hover: var(--xh-color-picker-confirm-trigger-bg-hover, var(--xh-_action-variant-bg-hover));
|
|
23993
|
+
--xh-action-bg-pressed: var(--xh-color-picker-confirm-trigger-bg-active, var(--xh-_action-variant-bg-pressed));
|
|
23994
|
+
--xh-action-fg-rest: var(--xh-color-picker-confirm-trigger-fg, var(--xh-_action-variant-fg-rest));
|
|
23995
|
+
--xh-action-fg-hover: var(--xh-color-picker-confirm-trigger-fg, var(--xh-_action-variant-fg-hover));
|
|
23996
|
+
--xh-action-fg-pressed: var(--xh-color-picker-confirm-trigger-fg, var(--xh-_action-variant-fg-pressed));
|
|
23997
|
+
--xh-action-border-rest: transparent;
|
|
23998
|
+
--xh-action-highlight-rest: transparent;
|
|
23999
|
+
--xh-action-shadow-rest: var(--xh-color-picker-confirm-trigger-shadow, none);
|
|
24000
|
+
--xh-action-shadow-hover: var(--xh-color-picker-confirm-trigger-shadow, none);
|
|
24001
|
+
--xh-action-shadow-pressed: var(--xh-color-picker-confirm-trigger-shadow, none);
|
|
24002
|
+
--xh-action-font-size: var(--xh-text-secondary-size);
|
|
24003
|
+
|
|
24004
|
+
border-width: 0;
|
|
24005
|
+
}
|
|
24006
|
+
|
|
24007
|
+
/* 单选时连接层给的是 hidden 属性;家族那条 display 会把 UA 规则盖掉 */
|
|
24008
|
+
[data-scope='color-picker'][data-part='confirm-trigger'][hidden] {
|
|
24009
|
+
display: none;
|
|
24010
|
+
}
|
|
24011
|
+
|
|
23841
24012
|
/* 预设色板的挂载点,同时充当色板的根节点:color-swatch-picker 那份皮的 root 规则落在
|
|
23842
24013
|
[data-scope='color-swatch-picker'][data-part='root'] 上,而这里没有那个节点,所以根上挂的那几个私有槽
|
|
23843
24014
|
(格子边长、间距、徽标尺寸、语气色、图标尺)与排布得在这儿照抄一遍;格子的皮仍归色板那一份。
|
|
@@ -23921,6 +24092,12 @@
|
|
|
23921
24092
|
outline: var(--xh-stroke-thin) solid ButtonBorder;
|
|
23922
24093
|
outline-offset: calc(-1 * var(--xh-stroke-thin));
|
|
23923
24094
|
}
|
|
24095
|
+
|
|
24096
|
+
/* 标签前的色点画的也是颜色本身:同样退出强制着色,用系统文字色描一圈 */
|
|
24097
|
+
[data-scope='color-picker'][data-part='tag-list'] > [data-scope='tag'][data-part='root'][data-value]::before {
|
|
24098
|
+
forced-color-adjust: none;
|
|
24099
|
+
border-color: CanvasText;
|
|
24100
|
+
}
|
|
23924
24101
|
}
|
|
23925
24102
|
|
|
23926
24103
|
/* styles/color-slider.css */
|
|
@@ -25936,6 +26113,30 @@
|
|
|
25936
26113
|
display: none;
|
|
25937
26114
|
}
|
|
25938
26115
|
|
|
26116
|
+
/* 整条占位:一段都没填、焦点也不在段上时,段位与分隔符让位给一句占位文字,焦点一进到段上就换回段位。
|
|
26117
|
+
段位只是淡出(仍可聚焦、仍在读屏树里),文字以生成内容压在同一行上、不吃指针,点下去落到底下的段位 */
|
|
26118
|
+
[data-scope='date-field'][data-part='segment-group'][data-placeholder-shown] {
|
|
26119
|
+
position: relative;
|
|
26120
|
+
color: transparent;
|
|
26121
|
+
}
|
|
26122
|
+
|
|
26123
|
+
[data-scope='date-field'][data-part='segment-group'][data-placeholder-shown] > * {
|
|
26124
|
+
opacity: 0;
|
|
26125
|
+
}
|
|
26126
|
+
|
|
26127
|
+
[data-scope='date-field'][data-part='segment-group'][data-placeholder-shown]::before {
|
|
26128
|
+
content: attr(data-placeholder-text);
|
|
26129
|
+
position: absolute;
|
|
26130
|
+
inset-inline: 0;
|
|
26131
|
+
inset-block-start: 50%;
|
|
26132
|
+
overflow: hidden;
|
|
26133
|
+
color: var(--xh-date-field-placeholder-fg, var(--xh-fg-subtle));
|
|
26134
|
+
white-space: nowrap;
|
|
26135
|
+
text-overflow: ellipsis;
|
|
26136
|
+
pointer-events: none;
|
|
26137
|
+
translate: 0 -50%;
|
|
26138
|
+
}
|
|
26139
|
+
|
|
25939
26140
|
[data-scope='date-field'][data-part='segment-group'] > :not([data-scope]) {
|
|
25940
26141
|
color: var(--xh-date-field-literal-fg, var(--xh-fg-subtle));
|
|
25941
26142
|
}
|
|
@@ -26048,6 +26249,15 @@
|
|
|
26048
26249
|
}
|
|
26049
26250
|
|
|
26050
26251
|
@media (forced-colors: active) {
|
|
26252
|
+
/* 整条占位的文字照系统的弱色画;段位让位时的透明字不被强制换色顶回来 */
|
|
26253
|
+
[data-scope='date-field'][data-part='segment-group'][data-placeholder-shown] {
|
|
26254
|
+
forced-color-adjust: none;
|
|
26255
|
+
}
|
|
26256
|
+
|
|
26257
|
+
[data-scope='date-field'][data-part='segment-group'][data-placeholder-shown]::before {
|
|
26258
|
+
color: GrayText;
|
|
26259
|
+
}
|
|
26260
|
+
|
|
26051
26261
|
[data-scope='date-field'][data-part='segment'][data-invalid]:is([data-focus], :focus-visible) {
|
|
26052
26262
|
outline: var(--xh-ring-width) solid Highlight;
|
|
26053
26263
|
outline-offset: var(--xh-ring-offset);
|
|
@@ -26283,11 +26493,69 @@
|
|
|
26283
26493
|
color: var(--xh-date-picker-literal-fg, var(--xh-fg-subtle));
|
|
26284
26494
|
}
|
|
26285
26495
|
|
|
26496
|
+
/* 整条占位:一段都没填、焦点也不在段上时,段位与分隔符让位给一句占位文字,焦点一进到段上就换回段位。
|
|
26497
|
+
段位只是淡出(仍可聚焦、仍在读屏树里),文字以生成内容压在同一行上、不吃指针,点下去落到底下的段位 */
|
|
26498
|
+
[data-scope='date-picker'][data-part='segment-group'][data-placeholder-shown] {
|
|
26499
|
+
position: relative;
|
|
26500
|
+
color: transparent;
|
|
26501
|
+
}
|
|
26502
|
+
|
|
26503
|
+
[data-scope='date-picker'][data-part='segment-group'][data-placeholder-shown] > * {
|
|
26504
|
+
opacity: 0;
|
|
26505
|
+
}
|
|
26506
|
+
|
|
26507
|
+
[data-scope='date-picker'][data-part='segment-group'][data-placeholder-shown]::before {
|
|
26508
|
+
content: attr(data-placeholder-text);
|
|
26509
|
+
position: absolute;
|
|
26510
|
+
inset-inline: 0;
|
|
26511
|
+
inset-block-start: 50%;
|
|
26512
|
+
overflow: hidden;
|
|
26513
|
+
color: var(--xh-date-picker-placeholder-fg, var(--xh-fg-subtle));
|
|
26514
|
+
white-space: nowrap;
|
|
26515
|
+
text-overflow: ellipsis;
|
|
26516
|
+
pointer-events: none;
|
|
26517
|
+
translate: 0 -50%;
|
|
26518
|
+
}
|
|
26519
|
+
|
|
26286
26520
|
/* 容器自己不占 Tab 位、也不承载焦点,环由 control 画,这里不再套一圈 */
|
|
26287
26521
|
[data-scope='date-picker'][data-part='segment-group']:focus-visible {
|
|
26288
26522
|
outline: none;
|
|
26289
26523
|
}
|
|
26290
26524
|
|
|
26525
|
+
/* 多选的标签行:段位让位,选中的日期在盒里排成标签,超过 maxTagCount 的折进 +N。
|
|
26526
|
+
行里每一枚都是 tag(data-scope="tag"),样子归 tag.css;行怎么排、标签怎么进出归标签行家族配方,
|
|
26527
|
+
这里只接使用者的间距槽,并让它像段位那样占满输入行剩下的宽度 */
|
|
26528
|
+
[data-scope='date-picker'][data-part='tag-list'] {
|
|
26529
|
+
--xh-tag-list-gap: var(--xh-date-picker-tag-list-gap, var(--xh-space-1));
|
|
26530
|
+
|
|
26531
|
+
/* 基准取 0:只吃两颗钮剩下的宽度、在自己里面折行;按内容宽算基准的话,盒子会先在钮前面折行,把钮挤到最后一行 */
|
|
26532
|
+
flex: 1 1 0;
|
|
26533
|
+
flex-wrap: wrap;
|
|
26534
|
+
font-size: var(--xh-date-picker-font-size, var(--xh-_date-picker-font-size));
|
|
26535
|
+
}
|
|
26536
|
+
|
|
26537
|
+
/* 日期标签是定长文字,截短了就读不出是哪天:不收缩,排不下就折到下一行(与标签输入同一种排法),
|
|
26538
|
+
盒随行数长高(字段家族的 multi-tag 布局给),到上限后在盒内滚动 */
|
|
26539
|
+
[data-scope='date-picker'][data-part='tag-list'] > [data-scope='tag'][data-part='root'] {
|
|
26540
|
+
flex: none;
|
|
26541
|
+
}
|
|
26542
|
+
|
|
26543
|
+
[data-scope='date-picker'][data-part='control'][data-xh-field-layout='multi-tag'] {
|
|
26544
|
+
max-block-size: var(--xh-date-picker-control-max-h, var(--xh-viewport-h-sm));
|
|
26545
|
+
overflow-y: auto;
|
|
26546
|
+
}
|
|
26547
|
+
|
|
26548
|
+
/* 没有选中时这一行承载整条占位:与单选那条占位同一句文字、同一个颜色槽 */
|
|
26549
|
+
[data-scope='date-picker'][data-part='tag-list'][data-placeholder-shown]::before {
|
|
26550
|
+
content: attr(data-placeholder-text);
|
|
26551
|
+
min-inline-size: 0;
|
|
26552
|
+
overflow: hidden;
|
|
26553
|
+
color: var(--xh-date-picker-placeholder-fg, var(--xh-fg-subtle));
|
|
26554
|
+
white-space: nowrap;
|
|
26555
|
+
text-overflow: ellipsis;
|
|
26556
|
+
pointer-events: none;
|
|
26557
|
+
}
|
|
26558
|
+
|
|
26291
26559
|
/* 两个按钮同一副长相:贴在框内末端的小方钮,不占宽度也不撑高 control。正方视觉盒、inset 圆角、
|
|
26292
26560
|
悬停 100 / 按下 200 与 0.97 按压、粗指针热区、禁用面与 :focus-visible 关环(盒的 :focus-within
|
|
26293
26561
|
已画了一圈)全由 Action Control 的 field-inset ghost 档给,组件只映射既有覆盖槽。
|
|
@@ -26327,10 +26595,11 @@
|
|
|
26327
26595
|
--xh-action-fg-rest: var(--xh-date-picker-action-fg-hover, var(--xh-fg-default));
|
|
26328
26596
|
}
|
|
26329
26597
|
|
|
26330
|
-
/*
|
|
26598
|
+
/* 有值时清空钮顶上来,日历钮让位:两颗并排堆着用户分不清点哪个。
|
|
26599
|
+
多选不让位:段位收起后日历钮是唯一的键盘入口(退格摘标签也在它身上),藏了键盘就进不来 */
|
|
26331
26600
|
[data-scope='date-picker'][data-part='control']:has(
|
|
26332
26601
|
> [data-scope='date-picker'][data-part='clear-trigger']:not([hidden])
|
|
26333
|
-
)
|
|
26602
|
+
):not(:has(> [data-scope='date-picker'][data-part='tag-list']:not([hidden])))
|
|
26334
26603
|
> [data-scope='date-picker'][data-part='trigger'] {
|
|
26335
26604
|
display: none;
|
|
26336
26605
|
}
|
|
@@ -26349,9 +26618,10 @@
|
|
|
26349
26618
|
border-radius: var(--xh-date-picker-content-radius, var(--xh-shape-overlay));
|
|
26350
26619
|
background: var(--xh-date-picker-content-bg, var(--xh-bg-surface));
|
|
26351
26620
|
color: var(--xh-date-picker-content-fg, var(--xh-fg-default));
|
|
26352
|
-
/*
|
|
26621
|
+
/* 日历是定高结构:网格、时间列与确认行都按 px 排,天然高度就是它们的和,缺省不另设上限
|
|
26622
|
+
(按 rem 的滚动面档会随根字号缩小,根字号低于 16px 时确认行就被挤到滚动里);
|
|
26353
26623
|
可用高度是定位引擎算出的视口余量,视口真放不下时再收一截 */
|
|
26354
|
-
max-block-size: min(var(--xh-date-picker-max-h, var(--xh-
|
|
26624
|
+
max-block-size: min(var(--xh-date-picker-max-h, var(--xh-_date-picker-available-h)), var(--xh-_date-picker-available-h));
|
|
26355
26625
|
/* 两轴都滚:块轴放不下时面板内自己竖滚,行内轴放不下时面板内自己横滚,
|
|
26356
26626
|
日历那几块保持各自的天然宽度,不被压 */
|
|
26357
26627
|
overflow: auto;
|
|
@@ -26814,6 +27084,16 @@
|
|
|
26814
27084
|
}
|
|
26815
27085
|
|
|
26816
27086
|
@media (forced-colors: active) {
|
|
27087
|
+
/* 整条占位的文字照系统的弱色画;段位让位时的透明字不被强制换色顶回来 */
|
|
27088
|
+
[data-scope='date-picker'][data-part='segment-group'][data-placeholder-shown] {
|
|
27089
|
+
forced-color-adjust: none;
|
|
27090
|
+
}
|
|
27091
|
+
|
|
27092
|
+
[data-scope='date-picker'][data-part='segment-group'][data-placeholder-shown]::before,
|
|
27093
|
+
[data-scope='date-picker'][data-part='tag-list'][data-placeholder-shown]::before {
|
|
27094
|
+
color: GrayText;
|
|
27095
|
+
}
|
|
27096
|
+
|
|
26817
27097
|
/* 系统接管底色后仍保住末端对号;禁用标记改用系统失效色。 */
|
|
26818
27098
|
[data-scope='date-picker'][data-part='preset']::after,
|
|
26819
27099
|
[data-scope='date-picker'][data-part='time-item']::after {
|
|
@@ -27090,6 +27370,30 @@
|
|
|
27090
27370
|
color: var(--xh-date-range-picker-literal-fg, var(--xh-fg-subtle));
|
|
27091
27371
|
}
|
|
27092
27372
|
|
|
27373
|
+
/* 整条占位:一段都没填、焦点也不在段上时,段位与分隔符让位给一句占位文字,焦点一进到段上就换回段位。
|
|
27374
|
+
段位只是淡出(仍可聚焦、仍在读屏树里),文字以生成内容压在同一行上、不吃指针,点下去落到底下的段位 */
|
|
27375
|
+
[data-scope='date-range-picker'][data-part='segment-group'][data-placeholder-shown] {
|
|
27376
|
+
position: relative;
|
|
27377
|
+
color: transparent;
|
|
27378
|
+
}
|
|
27379
|
+
|
|
27380
|
+
[data-scope='date-range-picker'][data-part='segment-group'][data-placeholder-shown] > * {
|
|
27381
|
+
opacity: 0;
|
|
27382
|
+
}
|
|
27383
|
+
|
|
27384
|
+
[data-scope='date-range-picker'][data-part='segment-group'][data-placeholder-shown]::before {
|
|
27385
|
+
content: attr(data-placeholder-text);
|
|
27386
|
+
position: absolute;
|
|
27387
|
+
inset-inline: 0;
|
|
27388
|
+
inset-block-start: 50%;
|
|
27389
|
+
overflow: hidden;
|
|
27390
|
+
color: var(--xh-date-range-picker-placeholder-fg, var(--xh-fg-subtle));
|
|
27391
|
+
white-space: nowrap;
|
|
27392
|
+
text-overflow: ellipsis;
|
|
27393
|
+
pointer-events: none;
|
|
27394
|
+
translate: 0 -50%;
|
|
27395
|
+
}
|
|
27396
|
+
|
|
27093
27397
|
/* 容器自己不占 Tab 位、也不承载焦点,环由 control 画,这里不再套一圈 */
|
|
27094
27398
|
[data-scope='date-range-picker'][data-part='segment-group']:focus-visible {
|
|
27095
27399
|
outline: none;
|
|
@@ -27156,9 +27460,10 @@
|
|
|
27156
27460
|
border-radius: var(--xh-date-range-picker-content-radius, var(--xh-shape-overlay));
|
|
27157
27461
|
background: var(--xh-date-range-picker-content-bg, var(--xh-bg-surface));
|
|
27158
27462
|
color: var(--xh-date-range-picker-content-fg, var(--xh-fg-default));
|
|
27159
|
-
/*
|
|
27463
|
+
/* 日历是定高结构:网格、时间列与确认行都按 px 排,天然高度就是它们的和,缺省不另设上限
|
|
27464
|
+
(按 rem 的滚动面档会随根字号缩小,根字号低于 16px 时确认行就被挤到滚动里);
|
|
27160
27465
|
可用高度是定位引擎算出的视口余量,视口真放不下时再收一截 */
|
|
27161
|
-
max-block-size: min(var(--xh-date-range-picker-max-h, var(--xh-
|
|
27466
|
+
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));
|
|
27162
27467
|
/* 两轴都滚:块轴放不下时面板内自己竖滚,行内轴放不下时面板内自己横滚,
|
|
27163
27468
|
日历那几块保持各自的天然宽度,不被压 */
|
|
27164
27469
|
overflow: auto;
|
|
@@ -27642,6 +27947,15 @@
|
|
|
27642
27947
|
}
|
|
27643
27948
|
|
|
27644
27949
|
@media (forced-colors: active) {
|
|
27950
|
+
/* 整条占位的文字照系统的弱色画;段位让位时的透明字不被强制换色顶回来 */
|
|
27951
|
+
[data-scope='date-range-picker'][data-part='segment-group'][data-placeholder-shown] {
|
|
27952
|
+
forced-color-adjust: none;
|
|
27953
|
+
}
|
|
27954
|
+
|
|
27955
|
+
[data-scope='date-range-picker'][data-part='segment-group'][data-placeholder-shown]::before {
|
|
27956
|
+
color: GrayText;
|
|
27957
|
+
}
|
|
27958
|
+
|
|
27645
27959
|
/* 系统接管底色后仍保住末端对号;禁用标记改用系统失效色。 */
|
|
27646
27960
|
[data-scope='date-range-picker'][data-part='preset']::after,
|
|
27647
27961
|
[data-scope='date-range-picker'][data-part='time-item']::after {
|
|
@@ -28995,6 +29309,10 @@
|
|
|
28995
29309
|
display: flex;
|
|
28996
29310
|
flex-direction: column;
|
|
28997
29311
|
gap: var(--xh-field-gap, var(--xh-space-1));
|
|
29312
|
+
/* 字段族控件放进字段即铺满字段宽:字段的宽由表单的列给,控件跟着列走,
|
|
29313
|
+
不必逐个组件在根上写 inline-size: 100%。单独摆放的控件仍是 16rem 缺省宽;
|
|
29314
|
+
单类钉宽(--xh-<组件>-control-w)照旧压过这一条 */
|
|
29315
|
+
--xh-control-w: 100%;
|
|
28998
29316
|
}
|
|
28999
29317
|
|
|
29000
29318
|
/* 表单横排(标签左置):字段转两列网格,标签列宽由表单的 --xh-form-label-w 统一给,
|
|
@@ -29597,6 +29915,14 @@
|
|
|
29597
29915
|
flex-flow: row wrap;
|
|
29598
29916
|
align-items: start;
|
|
29599
29917
|
column-gap: var(--xh-form-inline-gap, var(--xh-space-4));
|
|
29918
|
+
/* 一行流里字段按内容收,没有列宽可铺:在表单根上取下此处的字段缺省宽,交给下面的字段还原 */
|
|
29919
|
+
--xh-_form-inline-control-w: var(--xh-control-w);
|
|
29920
|
+
}
|
|
29921
|
+
|
|
29922
|
+
/* 字段会把里面的控件铺满字段宽,而一行流的字段宽正是由控件撑出来的,两者互相指望就塌成内容宽;
|
|
29923
|
+
这一档的字段还原成表单根上的缺省宽 */
|
|
29924
|
+
[data-scope='form'][data-part='root'][data-layout='inline'] [data-scope='field'][data-part='root'] {
|
|
29925
|
+
--xh-control-w: var(--xh-_form-inline-control-w);
|
|
29600
29926
|
}
|
|
29601
29927
|
|
|
29602
29928
|
/* 一列是网格档的缺省,这里从两列起逐档写 */
|
|
@@ -34082,7 +34408,7 @@
|
|
|
34082
34408
|
}
|
|
34083
34409
|
|
|
34084
34410
|
[data-scope='notification'][data-part='group'][data-stacked][data-preset='toast'] {
|
|
34085
|
-
inline-size: min(var(--xh-notification-item-w,
|
|
34411
|
+
inline-size: min(var(--xh-notification-item-w, var(--xh-overlay-toast-w)), calc(100vw - var(--xh-space-8)));
|
|
34086
34412
|
}
|
|
34087
34413
|
|
|
34088
34414
|
[data-scope='notification'][data-part='group'][data-stacked][data-placement^='bottom'] {
|
|
@@ -34191,7 +34517,7 @@
|
|
|
34191
34517
|
display: flex;
|
|
34192
34518
|
align-items: flex-start;
|
|
34193
34519
|
column-gap: var(--xh-notification-item-gap, var(--xh-space-2));
|
|
34194
|
-
inline-size: var(--xh-notification-item-w,
|
|
34520
|
+
inline-size: var(--xh-notification-item-w, var(--xh-overlay-toast-w));
|
|
34195
34521
|
padding-block: var(--xh-notification-item-py, var(--xh-space-3));
|
|
34196
34522
|
padding-inline: var(--xh-notification-item-px, var(--xh-space-4));
|
|
34197
34523
|
font-size: var(--xh-notification-item-font-size, var(--xh-text-label-size));
|
|
@@ -34476,8 +34802,14 @@
|
|
|
34476
34802
|
);
|
|
34477
34803
|
}
|
|
34478
34804
|
|
|
34805
|
+
/* 正文有上限:推一段长文(公告全文)进来时卡片不被撑到整屏高——摞是整面视口的定位面、不吃指针也不裁切,
|
|
34806
|
+
撑出视口的那截既看不到也滚不到。超出的部分在正文自己里面滚,标题与操作钮留在卡片上;
|
|
34807
|
+
滚到头不把滚动量传给页面 */
|
|
34479
34808
|
[data-scope='notification'][data-part='item-description'] {
|
|
34480
34809
|
margin: 0;
|
|
34810
|
+
max-block-size: var(--xh-notification-description-max-h, var(--xh-viewport-h-md));
|
|
34811
|
+
overflow-y: auto;
|
|
34812
|
+
overscroll-behavior: contain;
|
|
34481
34813
|
color: var(--xh-notification-description-fg, var(--xh-fg-muted));
|
|
34482
34814
|
font-size: var(--xh-notification-description-font-size, var(--xh-text-secondary-size));
|
|
34483
34815
|
}
|
|
@@ -42194,6 +42526,23 @@
|
|
|
42194
42526
|
user-select: none;
|
|
42195
42527
|
}
|
|
42196
42528
|
|
|
42529
|
+
/* 列对齐:data-align 控制列头与数据格的文本与内容对齐方向;
|
|
42530
|
+
显式写出三档以便 start 能重置自定义皮肤里可能存在的非默认对齐 */
|
|
42531
|
+
[data-scope='table']:is([data-part='column-header'], [data-part='cell'])[data-align='start'] {
|
|
42532
|
+
text-align: start;
|
|
42533
|
+
justify-content: start;
|
|
42534
|
+
}
|
|
42535
|
+
|
|
42536
|
+
[data-scope='table']:is([data-part='column-header'], [data-part='cell'])[data-align='center'] {
|
|
42537
|
+
text-align: center;
|
|
42538
|
+
justify-content: center;
|
|
42539
|
+
}
|
|
42540
|
+
|
|
42541
|
+
[data-scope='table']:is([data-part='column-header'], [data-part='cell'])[data-align='end'] {
|
|
42542
|
+
text-align: end;
|
|
42543
|
+
justify-content: end;
|
|
42544
|
+
}
|
|
42545
|
+
|
|
42197
42546
|
/* 列名是列头里唯一可收窄的一格:flex: 1 吃掉余量、把排序钮 / 列宽把手推到行尾,min-inline-size: 0 让它在
|
|
42198
42547
|
窄列上收得下去并出省略号。列名不能裸写成文本节点:flex 行里的裸文本是匿名 flex item,min-inline-size 取 auto
|
|
42199
42548
|
(nowrap 文本的 min-content)缩不下去,96px 的列配一串长列名时定尺的把手连同 auto 外边距一起被挤出列头盒、
|
|
@@ -45133,6 +45482,27 @@
|
|
|
45133
45482
|
display: none;
|
|
45134
45483
|
}
|
|
45135
45484
|
|
|
45485
|
+
/* 多选的标签行:段位让位,选中的时刻在盒里排成标签,超过 maxTagCount 的折进 +N。
|
|
45486
|
+
行里每一枚都是 tag(data-scope="tag"),样子归 tag.css;行怎么排、标签怎么进出归标签行家族配方。
|
|
45487
|
+
基准取 0:只吃两颗钮剩下的宽度、在自己里面折行;按内容宽算基准的话,盒子会先在钮前面折行,把钮挤到最后一行 */
|
|
45488
|
+
[data-scope='time-picker'][data-part='tag-list'] {
|
|
45489
|
+
--xh-tag-list-gap: var(--xh-time-picker-tag-list-gap, var(--xh-space-1));
|
|
45490
|
+
|
|
45491
|
+
flex: 1 1 0;
|
|
45492
|
+
flex-wrap: wrap;
|
|
45493
|
+
}
|
|
45494
|
+
|
|
45495
|
+
/* 时刻标签是定长文字,截短了就读不出是几点:不收缩,排不下就折到下一行(与标签输入同一种排法),
|
|
45496
|
+
盒随行数长高(字段家族的 multi-tag 布局给),到上限后在盒内滚动 */
|
|
45497
|
+
[data-scope='time-picker'][data-part='tag-list'] > [data-scope='tag'][data-part='root'] {
|
|
45498
|
+
flex: none;
|
|
45499
|
+
}
|
|
45500
|
+
|
|
45501
|
+
[data-scope='time-picker'][data-part='control'][data-xh-field-layout='multi-tag'] {
|
|
45502
|
+
max-block-size: var(--xh-time-picker-control-max-h, var(--xh-viewport-h-sm));
|
|
45503
|
+
overflow-y: auto;
|
|
45504
|
+
}
|
|
45505
|
+
|
|
45136
45506
|
[data-scope='time-picker'][data-part='segment-group'] > :not([data-scope]) {
|
|
45137
45507
|
color: var(--xh-time-picker-literal-fg, var(--xh-fg-subtle));
|
|
45138
45508
|
}
|
|
@@ -45238,10 +45608,11 @@
|
|
|
45238
45608
|
--xh-action-fg-rest: var(--xh-time-picker-action-fg-hover, var(--xh-fg-default));
|
|
45239
45609
|
}
|
|
45240
45610
|
|
|
45241
|
-
/*
|
|
45611
|
+
/* 有值时清空钮顶上来,展开钮让位:两颗并排堆着用户分不清点哪个。
|
|
45612
|
+
多选不让位:段位收起后展开钮是唯一的键盘入口(退格摘标签也在它身上),藏了键盘就进不来 */
|
|
45242
45613
|
[data-scope='time-picker'][data-part='control']:has(
|
|
45243
45614
|
> [data-scope='time-picker'][data-part='clear-trigger']:not([hidden])
|
|
45244
|
-
)
|
|
45615
|
+
):not(:has(> [data-scope='time-picker'][data-part='tag-list']:not([hidden])))
|
|
45245
45616
|
> [data-scope='time-picker'][data-part='trigger'] {
|
|
45246
45617
|
display: none;
|
|
45247
45618
|
}
|
|
@@ -45291,6 +45662,40 @@
|
|
|
45291
45662
|
animation: xh-overlay-slide-out var(--xh-motion-duration-exit) var(--xh-motion-ease-exit) forwards;
|
|
45292
45663
|
}
|
|
45293
45664
|
|
|
45665
|
+
/* 「添加」沉到各列的右下角:它是多选时整块面板的出口,不跟列顶对齐 */
|
|
45666
|
+
[data-scope='time-picker'][data-part='content'] > [data-scope='time-picker'][data-part='confirm-trigger'] {
|
|
45667
|
+
flex: none;
|
|
45668
|
+
align-self: flex-end;
|
|
45669
|
+
margin-inline-start: var(--xh-time-picker-confirm-trigger-gap, var(--xh-space-1));
|
|
45670
|
+
}
|
|
45671
|
+
|
|
45672
|
+
/* 「添加」是面板里唯一的主要动作:品牌实心、悬停 / 按下与 0.97 按压、焦点环全由 Action Control 的
|
|
45673
|
+
text solid 档给;槽名统一按部件取 --xh-time-picker-confirm-trigger-*,只映射到家族桥接槽 */
|
|
45674
|
+
[data-scope='time-picker'][data-part='confirm-trigger'] {
|
|
45675
|
+
--xh-action-visual-size: var(--xh-time-picker-confirm-trigger-h, var(--xh-_action-profile-visual-size));
|
|
45676
|
+
--xh-action-padding-inline: var(--xh-time-picker-confirm-trigger-px, var(--xh-_action-profile-padding-inline));
|
|
45677
|
+
--xh-action-radius: var(--xh-time-picker-confirm-trigger-radius, var(--xh-shape-control));
|
|
45678
|
+
--xh-action-bg-rest: var(--xh-time-picker-confirm-trigger-bg, var(--xh-_action-variant-bg-rest));
|
|
45679
|
+
--xh-action-bg-hover: var(--xh-time-picker-confirm-trigger-bg-hover, var(--xh-_action-variant-bg-hover));
|
|
45680
|
+
--xh-action-bg-pressed: var(--xh-time-picker-confirm-trigger-bg-active, var(--xh-_action-variant-bg-pressed));
|
|
45681
|
+
--xh-action-fg-rest: var(--xh-time-picker-confirm-trigger-fg, var(--xh-_action-variant-fg-rest));
|
|
45682
|
+
--xh-action-fg-hover: var(--xh-time-picker-confirm-trigger-fg, var(--xh-_action-variant-fg-hover));
|
|
45683
|
+
--xh-action-fg-pressed: var(--xh-time-picker-confirm-trigger-fg, var(--xh-_action-variant-fg-pressed));
|
|
45684
|
+
--xh-action-border-rest: transparent;
|
|
45685
|
+
--xh-action-highlight-rest: transparent;
|
|
45686
|
+
--xh-action-shadow-rest: var(--xh-time-picker-confirm-trigger-shadow, none);
|
|
45687
|
+
--xh-action-shadow-hover: var(--xh-time-picker-confirm-trigger-shadow, none);
|
|
45688
|
+
--xh-action-shadow-pressed: var(--xh-time-picker-confirm-trigger-shadow, none);
|
|
45689
|
+
--xh-action-font-size: var(--xh-text-secondary-size);
|
|
45690
|
+
|
|
45691
|
+
border-width: 0;
|
|
45692
|
+
}
|
|
45693
|
+
|
|
45694
|
+
/* 单选时连接层给的是 hidden 属性;家族那条 display 会把 UA 规则盖掉 */
|
|
45695
|
+
[data-scope='time-picker'][data-part='confirm-trigger'][hidden] {
|
|
45696
|
+
display: none;
|
|
45697
|
+
}
|
|
45698
|
+
|
|
45294
45699
|
/* 快捷选项也是一列,与时分秒那几列并排,排在行内起始一侧 */
|
|
45295
45700
|
[data-scope='time-picker'][data-part='preset-group'] {
|
|
45296
45701
|
display: flex;
|
|
@@ -49157,26 +49562,88 @@
|
|
|
49157
49562
|
}
|
|
49158
49563
|
|
|
49159
49564
|
/*
|
|
49160
|
-
*
|
|
49161
|
-
*
|
|
49565
|
+
* 连接线:父节点展开箭头的中线向下引一道竖线,每个子节点从竖线横出一段接到自己行首(├),
|
|
49566
|
+
* 最后一个子节点的竖线止于它那一行的中线(└),层级深时一眼看得出谁挂在谁下面。
|
|
49567
|
+
* 线由每个子节点自己画:子节点的行画「这一段竖线 + 横出的那一段」,展开着的非末位分支再由它的子层
|
|
49568
|
+
* 把竖线接过它整棵子树,交给下一个兄弟。子节点之间、分支行与子层之间的间距由线向上下伸出补齐,竖线不断开。
|
|
49569
|
+
* 只画在竖排的子层里:顶层节点没有父节点可连,横排的末端层没有行首可接。
|
|
49570
|
+
* 首个与末位子节点按子层里的结构次序认:子层里只放节点,收起的子树整块不显示、不影响次序。
|
|
49162
49571
|
* 它是内部分隔的一种,颜色取 border-subtle;行悬停与选中换面时线压在面上照样看得见
|
|
49163
49572
|
*/
|
|
49164
49573
|
[data-scope='tree'][data-part='tree'][data-lines] [data-scope='tree'][data-part='branch-content'] {
|
|
49165
49574
|
position: relative;
|
|
49166
49575
|
}
|
|
49167
49576
|
|
|
49168
|
-
|
|
49577
|
+
/* 竖线落在父节点展开箭头的中线上:父行的行首内边距加半个箭头盒,换算到缩进了一格的子节点坐标里。
|
|
49578
|
+
向上伸出的量补的是上方那段间距(首个子节点补分支行与子层之间的那段),向下补到下一个兄弟 */
|
|
49579
|
+
[data-scope='tree'][data-part='tree'][data-lines] [data-scope='tree'][data-part='branch-content'][data-orientation='vertical'] > [data-scope='tree'][data-part='item'],
|
|
49580
|
+
[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'] {
|
|
49581
|
+
--xh-_tree-line-x: calc(
|
|
49582
|
+
var(--xh-tree-row-px, var(--xh-_tree-row-px)) +
|
|
49583
|
+
var(--xh-_tree-indicator-size) / 2 -
|
|
49584
|
+
var(--xh-stroke-thin) / 2 -
|
|
49585
|
+
var(--xh-tree-indent, var(--xh-_tree-indent))
|
|
49586
|
+
);
|
|
49587
|
+
--xh-_tree-line-top: 0px;
|
|
49588
|
+
--xh-_tree-line-bottom: var(--xh-tree-branch-content-gap, var(--xh-list-option-gap));
|
|
49589
|
+
|
|
49590
|
+
position: relative;
|
|
49591
|
+
}
|
|
49592
|
+
|
|
49593
|
+
[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,
|
|
49594
|
+
[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'] {
|
|
49595
|
+
--xh-_tree-line-top: var(--xh-tree-branch-gap, var(--xh-list-option-gap));
|
|
49596
|
+
}
|
|
49597
|
+
|
|
49598
|
+
/* 展开着的非末位分支:行下面先是它自己的子层,竖线只伸到子层顶上,余下那段由子层接着画 */
|
|
49599
|
+
[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'] {
|
|
49600
|
+
--xh-_tree-line-bottom: var(--xh-tree-branch-gap, var(--xh-list-option-gap));
|
|
49601
|
+
}
|
|
49602
|
+
|
|
49603
|
+
[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,
|
|
49604
|
+
[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 {
|
|
49169
49605
|
content: '';
|
|
49170
49606
|
position: absolute;
|
|
49171
|
-
inset-block:
|
|
49172
|
-
|
|
49607
|
+
inset-block: calc(var(--xh-_tree-line-top) * -1) calc(var(--xh-_tree-line-bottom) * -1);
|
|
49608
|
+
inset-inline-start: var(--xh-_tree-line-x);
|
|
49609
|
+
/* 分支横出到展开箭头盒的起点;叶子没有箭头,横线穿过占位那一格接到正文前 */
|
|
49610
|
+
inline-size: calc(var(--xh-tree-row-px, var(--xh-_tree-row-px)) - var(--xh-_tree-line-x));
|
|
49611
|
+
border-inline-start: var(--xh-stroke-thin) solid var(--xh-tree-line-color, var(--xh-border-subtle));
|
|
49612
|
+
/* 横出的那段落在行的中线:线盒上下伸出的量不对称时按差值的一半补回 */
|
|
49613
|
+
background: linear-gradient(var(--xh-tree-line-color, var(--xh-border-subtle)), var(--xh-tree-line-color, var(--xh-border-subtle)))
|
|
49614
|
+
0 calc(50% + (var(--xh-_tree-line-top) - var(--xh-_tree-line-bottom)) / 2) / 100% var(--xh-stroke-thin) no-repeat;
|
|
49615
|
+
pointer-events: none;
|
|
49616
|
+
}
|
|
49617
|
+
|
|
49618
|
+
[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 {
|
|
49619
|
+
inline-size: calc(
|
|
49620
|
+
var(--xh-tree-row-px, var(--xh-_tree-row-px)) +
|
|
49621
|
+
var(--xh-_tree-indicator-size) -
|
|
49622
|
+
var(--xh-_tree-line-x)
|
|
49623
|
+
);
|
|
49624
|
+
}
|
|
49625
|
+
|
|
49626
|
+
/* 最后一个子节点:竖线止于行的中线并在那里拐向行首(└),下面不再有兄弟要接 */
|
|
49627
|
+
[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,
|
|
49628
|
+
[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 {
|
|
49629
|
+
inset-block-end: calc(50% - var(--xh-stroke-thin) / 2);
|
|
49630
|
+
border-block-end: var(--xh-stroke-thin) solid var(--xh-tree-line-color, var(--xh-border-subtle));
|
|
49631
|
+
background: none;
|
|
49632
|
+
}
|
|
49633
|
+
|
|
49634
|
+
/* 展开着的非末位分支:它的子层把父节点那道竖线接过整棵子树,一直伸到下一个兄弟。
|
|
49635
|
+
子层的盒与分支同起点(缩进是子层自己的内边距),竖线位置与分支行里那一段相同 */
|
|
49636
|
+
[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 {
|
|
49637
|
+
content: '';
|
|
49638
|
+
position: absolute;
|
|
49639
|
+
inset-block: 0 calc(var(--xh-tree-branch-content-gap, var(--xh-list-option-gap)) * -1);
|
|
49173
49640
|
inset-inline-start: calc(
|
|
49174
49641
|
var(--xh-tree-row-px, var(--xh-_tree-row-px)) +
|
|
49175
49642
|
var(--xh-tree-indicator-size, var(--xh-_tree-indicator)) / 2 -
|
|
49176
|
-
var(--xh-stroke-thin) / 2
|
|
49643
|
+
var(--xh-stroke-thin) / 2 -
|
|
49644
|
+
var(--xh-tree-indent, var(--xh-_tree-indent))
|
|
49177
49645
|
);
|
|
49178
|
-
inline-
|
|
49179
|
-
background: var(--xh-tree-line-color, var(--xh-border-subtle));
|
|
49646
|
+
border-inline-start: var(--xh-stroke-thin) solid var(--xh-tree-line-color, var(--xh-border-subtle));
|
|
49180
49647
|
pointer-events: none;
|
|
49181
49648
|
}
|
|
49182
49649
|
|
|
@@ -49405,10 +49872,18 @@
|
|
|
49405
49872
|
}
|
|
49406
49873
|
}
|
|
49407
49874
|
|
|
49408
|
-
/*
|
|
49875
|
+
/* 强制色:连接线的横段是一块渐变底色、竖段是描边,系统色下一个被抹掉、一个被换成文字色;
|
|
49876
|
+
两段都写 GrayText,并只让连接线不参与强制换色 */
|
|
49409
49877
|
@media (forced-colors: active) {
|
|
49410
|
-
[data-scope='tree'][data-part='tree'][data-lines] [data-scope='tree'][data-part='branch-content']::before
|
|
49411
|
-
|
|
49878
|
+
[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,
|
|
49879
|
+
[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 {
|
|
49880
|
+
border-color: GrayText;
|
|
49881
|
+
background-image: linear-gradient(GrayText, GrayText);
|
|
49882
|
+
forced-color-adjust: none;
|
|
49883
|
+
}
|
|
49884
|
+
|
|
49885
|
+
[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 {
|
|
49886
|
+
border-color: GrayText;
|
|
49412
49887
|
forced-color-adjust: none;
|
|
49413
49888
|
}
|
|
49414
49889
|
}
|