Files
aurora-admin f1fbfc2ddb
Regression / regression (push) Canceled after 0s
feat(品牌标识): 几何 K 图标(favicon/顶栏标记/theme-color) + 并行会话成果入库
## 品牌标识(本次会话)

起因:品牌此前没有任何图形标识 —— 唯一 favicon 是内联 data-URI 里的字母「A」,
那是 v2.0.0「Aurora Admin → Kole UI」改名漏掉的一处(PC 顶栏也是「A」,
移动端站已是「K」;移动端文档站则完全没有 favicon)。

- 几何:24 网格三个互不接触的笔画(竖 + 两斜),圆头描边;
  描边 2.25 → 16px 标签页尺寸下正好 1.5px = 规范原文「描边1.5px」
- 取色分两套(刻意):favicon 硬编码品牌蓝/白(渲染在浏览器标签栏,不继承 kole-dark);
  顶栏标记走 currentColor(实测暗色下自动转 rgb(20,22,28))
- 新增 theme-color 双条(light #FFFFFF / dark #1C1F26,取 --kole-color-card-bg)
- 修 site/app.js hero 标语 KOLE ADMIN → KOLE UI(改名变形残留)
- 移动端 7 个模板补 favicon(此前计数 0)

验收:门禁 9 条全 OK(site-routing/site-routes/mobile-docs/mobile-site/isolation/
theme/nav/i18n/icons);PC 回归 1464/1464 · 移动端 807/807,各连跑 8 次一致;
两端 favicon 405 字节逐字节一致;PC 站控制台错误 1→0。

## 并行会话成果(本次一并入库)

- 图标系统:2576 图标(TDesign/Element Plus,MIT)+ 11 端注入 + 5 个构建门禁工具
  + IconPreview 预览页 + ICON-SPEC.md 冻结规格
- 移动端平台:47 组件 × 6 端 + 文档站 53 页 + 隔离门禁
- PC 组件:103 个大后台组件 / 组件11 批次
- uni-app:PC 端试点 + 移动端端实现 + 真实编译验证

## 工程

- .gitignore 补 .scratch/ 与 .zcode-preexisting-*.txt(会话中间产物,实测 9.1MB,不入库)
- CHANGELOG 补品牌标识条目
- ROADMAP 登 S8-P4(品牌标识任务包 + og:image/apple-touch-icon 未做部分)
2026-09-21 10:05:48 +08:00

229 lines
7.9 KiB
CSS
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* Kole UI Mobile · Table 样式 — 对齐移动端规格 §47
表格:列多时必须能横向滚动,但**不得让页面整体横向溢出** ——
滚动发生在组件自己的容器上(overflow-x: auto),而不是文档上。
表头固定用 position: sticky(不用 fixed:fixed 会脱出滚动容器,横向滚动时表头不跟随)。
行高不小于 44px;空态与加载态都在同一个容器内,不改变表格宽度。 */
.kole-m-table {
/* 组件级变量:业务侧可在容器上覆盖 */
--kole-m-table-row-height: var(--kole-m-touch-target); /* 行最小高度(≥44px 触控最小边长) */
--kole-m-table-cell-padding: var(--kole-space-12); /* 单元格左右内边距 */
--kole-m-table-min-width: 0; /* 内容最小宽度;超过容器即横向滚动 */
box-sizing: border-box;
display: flex;
flex-direction: column;
width: 100%;
/* 横向滚动容器:min-width: 0 让它能在 flex 父级里收缩,不把父级顶宽 */
min-width: 0;
background: var(--kole-color-card-bg);
color: var(--kole-color-text-body);
font-family: var(--kole-font-family);
font-size: var(--kole-m-font-size-body);
line-height: 1.4;
}
/* 滚动视口:横向滚动的唯一发生点。页面级横向溢出由它兜住。 */
.kole-m-table__viewport {
box-sizing: border-box;
width: 100%;
min-width: 0;
max-width: 100%;
overflow-x: auto;
overflow-y: visible;
-webkit-overflow-scrolling: touch;
/* 触屏上横向滑动不被父级纵向滚动吞掉 */
touch-action: pan-x pan-y;
}
.kole-m-table__caption {
margin: 0;
padding: var(--kole-m-table-cell-padding) var(--kole-m-gutter);
color: var(--kole-color-text-secondary);
font-size: var(--kole-m-font-size-label);
}
.kole-m-table__inner {
min-width: var(--kole-m-table-min-width);
margin: 0;
border-collapse: separate;
border-spacing: 0;
width: 100%;
}
/* 变体 mode=scroll:默认形态 —— 列多时在组件自己的视口里横向滚动 */
.kole-m-table--scroll .kole-m-table__viewport { overflow-x: auto; }
/* 变体 size=compact:行高 44px 不变(触控下限),只收紧上下内边距与字号 */
.kole-m-table--compact .kole-m-table__inner { font-size: var(--kole-m-font-size-label); }
/* 表头:sticky 在滚动视口顶部。由于视口只横向滚动、不设最大高度,
sticky 主要保证纵向滚动由页面承担时表头仍跟随(宿主给固定高度时也生效)。 */
.kole-m-table__head-cell {
box-sizing: border-box;
position: sticky;
top: 0;
z-index: 2;
padding: var(--kole-m-table-cell-padding) var(--kole-m-table-cell-padding);
margin: 0;
background: var(--kole-color-table-header-bg);
color: var(--kole-color-text-secondary);
font-weight: 500;
font-size: var(--kole-m-font-size-label);
line-height: 1.3;
white-space: nowrap;
text-align: start;
border-bottom: 1px solid var(--kole-color-border);
}
/* 变体 bordered=true:单元格之间也画竖线 */
.kole-m-table--bordered .kole-m-table__head-cell + .kole-m-table__head-cell,
.kole-m-table--bordered .kole-m-table__cell + .kole-m-table__cell {
border-inline-start: 1px solid var(--kole-color-border);
}
/* 变体 stripe=true:偶数行浅底,便于横向扫读时对齐行 */
.kole-m-table--stripe .kole-m-table__row:nth-child(even) .kole-m-table__cell {
background: var(--kole-color-table-header-bg);
}
.kole-m-table__cell {
box-sizing: border-box;
padding: var(--kole-m-table-cell-padding);
margin: 0;
background: var(--kole-color-card-bg);
color: var(--kole-color-text-body);
font-size: inherit;
line-height: 1.4;
vertical-align: middle;
text-align: start;
}
.kole-m-table__row { min-height: var(--kole-m-table-row-height); }
.kole-m-table__row .kole-m-table__cell { border-bottom: 1px solid var(--kole-color-border); }
.kole-m-table__row:last-child .kole-m-table__cell { border-bottom: 0; }
/* 列对齐(变体 align 由列定义给出;这里是三档工具类) */
.kole-m-table__cell--start,
.kole-m-table__head-cell--start { text-align: start; }
.kole-m-table__cell--center,
.kole-m-table__head-cell--center { text-align: center; }
.kole-m-table__cell--end,
.kole-m-table__head-cell--end { text-align: end; }
/* 数字列:等宽字 + 右对齐,方便按位对比 */
.kole-m-table__cell--number,
.kole-m-table__head-cell--number {
font-family: var(--kole-font-family-num);
text-align: end;
font-variant-numeric: tabular-nums;
}
/* 省略:长文本列默认单行省略,完整值由 title 承载 */
.kole-m-table__cell--ellipsis {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
max-width: 160px;
}
/* 状态 clickable:整行是热区(clickable=true)。
可点行必须**同时可聚焦**(tabindex="0" + role="row")—— 否则点击成了唯一的交互路径,
键盘与读屏用户点不到(规格 §47.6 明说「整行点击不能是唯一的键盘路径」)。
cursor 只给表体行:表头行不承载点击,跟着变手型会把「这里能点」这个信号弄错。 */
.kole-m-table__body .kole-m-table__row { cursor: pointer; }
.kole-m-table__body .kole-m-table__row:active .kole-m-table__cell {
background: var(--kole-color-brand-bg);
}
/* 可聚焦行的焦点环:画在行内第一个单元格上(tr 上画 outline 在部分浏览器不渲染) */
.kole-m-table__row:focus-visible .kole-m-table__cell:first-child {
outline: 2px solid var(--kole-color-focus-ring);
outline-offset: -2px;
}
/* 状态 selected:当前选中行 */
.kole-m-table__row.is-selected .kole-m-table__cell {
background: var(--kole-color-brand-bg);
color: var(--kole-color-brand);
font-weight: 500;
}
/* 状态 disabled:置灰且不响应 */
.kole-m-table__row.is-disabled .kole-m-table__cell {
color: var(--kole-color-text-disabled);
cursor: not-allowed;
}
/* 行内可聚焦元素(链接 / 按钮)的焦点环 */
.kole-m-table__cell a:focus-visible,
.kole-m-table__cell button:focus-visible {
outline: 2px solid var(--kole-color-focus-ring);
outline-offset: 2px;
}
/* 状态 empty:空态占位(不改变表格列宽语义,直接替换表格区) */
.kole-m-table__empty {
margin: 0;
padding: var(--kole-space-40) var(--kole-m-gutter);
background: var(--kole-color-card-bg);
color: var(--kole-color-text-secondary);
font-size: var(--kole-m-font-size-label);
text-align: center;
border-bottom: 1px solid var(--kole-color-border);
}
/* 变体 mode=card:小屏上把每行渲染成一张卡(键值对纵排),彻底不横向滚动 */
.kole-m-table--card .kole-m-table__viewport { overflow-x: visible; }
.kole-m-table--card .kole-m-table__inner { display: block; }
.kole-m-table--card .kole-m-table__head { display: none; }
.kole-m-table--card .kole-m-table__row {
display: block;
padding: var(--kole-m-table-cell-padding) var(--kole-m-gutter);
border-bottom: 1px solid var(--kole-color-border);
}
.kole-m-table--card .kole-m-table__row .kole-m-table__cell {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: var(--kole-space-12);
padding: var(--kole-space-4) 0;
border-bottom: 0;
}
/* 卡片模式下的字段名:由列的 label 生成(data-label 由实现写出) */
.kole-m-table--card .kole-m-table__cell::before {
content: attr(data-label);
flex: 0 0 auto;
color: var(--kole-color-text-secondary);
font-size: var(--kole-m-font-size-label);
}
/* 演示页触发器(非组件交付样式) */
.kole-m-table__demo-btn {
box-sizing: border-box;
min-height: var(--kole-m-touch-target);
padding: 0 var(--kole-m-gutter);
border: 1px solid var(--kole-color-border);
border-radius: var(--kole-radius-base);
background: var(--kole-color-card-bg);
color: var(--kole-color-text-body);
font-family: inherit;
font-size: var(--kole-m-font-size-label);
cursor: pointer;
touch-action: manipulation;
}
.kole-m-table__demo-btn:focus-visible {
outline: 2px solid var(--kole-color-focus-ring);
outline-offset: 2px;
}