Files
knowledge-governance/web/src/versionHistory.css
T
姚章浩 0f7b8987b4 feat(web): 全站改用越疆配色并统一模块页头
为什么:测试机工作台要长时间盯着看。原配色是深色侧栏 + 三种"主按钮"
(全局深藏青、监控页蓝、问答页黑),各模块页头字号/边距/是否装卡片各不相同;
另有一处真缺陷:全局 button:hover:not(:disabled) 特异性高于 .nav-item:hover,
悬停导航时被刷成白底,选中项文字几乎看不见。

改了什么:
- 色板改取越疆官网 dobot.cn:品牌钴蓝 #0039C8 为全站唯一强调/主操作色,
  文字与底色改为不带蓝紫偏色的中性灰(用户反馈紫色费眼);卡片细边 + 极轻投影。
- 侧栏改为明亮底,选中项浅钴蓝底 + 钴蓝字;悬停规则补 :not(:disabled) 修复白底。
  导航字号/点击区保持 16px / 44px(沿用 8d44d54 的放大决定)。
- 新增唯一一份 .page-header / .page-title / .page-subtitle;版本记录、系统设置、
  发布管理接入(版本记录页头不再装卡片),删掉各自重复的标题字号规则;
  page-shell 改为 max-width,模块自己的 1800/1500 上限终于生效。
- 版本记录、系统设置、问答同步状态里的硬编码蓝/石板灰映射回令牌;顺带修正
  6 个从未定义的变量(--border/--card/--accent/--brand 等)——它们此前只靠
  回退值或干脆不生效。

不改业务语义、权限、确认流程与接口调用。
验证:npm run typecheck、vitest 全量(110 文件 / 568 用例)通过;浏览器只读核对
导航悬停色、六个模块页头左缘/字号/字重一致。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 17:07:44 +08:00

400 lines
8.1 KiB
CSS

/* Version records: build identity first, then compact commit accordions. */
.version-history {
display: flex;
flex-direction: column;
gap: 18px;
min-width: 0;
padding: 22px 24px 40px;
color: var(--ink-base);
}
.version-history-current-card,
.version-history-records {
background: var(--bg-panel);
border: 1px solid var(--border-base);
border-radius: 10px;
padding: 20px;
min-width: 0;
}
.version-history h3 {
margin: 0;
font-size: 18px;
}
.version-history-header p,
.version-history-records-heading p {
margin: 0;
color: var(--ink-mute);
font-size: 13px;
}
.version-history-actions {
display: flex;
gap: 8px;
flex-shrink: 0;
}
.version-history-actions button {
padding: 7px 14px;
}
.version-history-build-grid {
display: grid;
grid-template-columns: 0.8fr 0.8fr 2fr 1.3fr;
margin: 16px 0 0;
border: 1px solid var(--border-base);
background: var(--bg-page);
}
.version-history-build-grid > div {
padding: 12px 14px;
min-width: 0;
border-right: 1px solid var(--border-base);
}
.version-history-build-grid > div:last-child {
border-right: 0;
}
.version-history dt {
color: var(--ink-mute);
font-size: 12px;
margin-bottom: 5px;
}
.version-history dd {
margin: 0;
overflow-wrap: anywhere;
font-size: 13px;
}
.version-history-running-version {
font-size: 22px !important;
font-weight: 650;
color: var(--ink-strong);
}
.version-history-running-state {
margin: 12px 0 0;
color: var(--ink-mute);
font-size: 12px;
overflow-wrap: anywhere;
}
.version-history-records-heading {
display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;
flex-wrap: wrap;
}
.version-history-sync-line {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 8px;
margin: 10px 0 14px;
color: var(--ink-mute);
font-size: 12px;
}
.version-history-notice {
padding: 10px 14px;
border-radius: 6px;
background: var(--c-run-bg);
font-size: 13px;
}
.version-history-filters {
display: flex;
gap: 6px;
flex-wrap: wrap;
margin: 0 0 16px;
}
.version-history-filters button {
padding: 5px 13px;
background: transparent;
color: var(--ink-mute);
box-shadow: none;
}
.version-history-filters button.active {
font-weight: 600;
color: var(--c-run);
background: var(--c-run-bg);
border-color: var(--c-run-border);
}
.version-history-timeline {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 10px;
min-width: 0;
}
.version-history-entry {
border: 1px solid var(--border-base);
border-radius: 8px;
background: var(--bg-panel);
min-width: 0;
overflow: hidden;
}
.version-history-entry.is-current {
border-color: #3ba879;
}
.version-history-entry-head {
display: flex;
align-items: center;
gap: 10px;
width: 100%;
min-height: 62px;
padding: 12px 16px;
border: 0;
border-radius: 0;
background: transparent;
box-shadow: none;
text-align: left;
color: inherit;
font-weight: 400;
}
.version-history-entry-head:hover {
background: var(--bg-hover);
}
.version-history-entry-head[aria-expanded='true'] {
background: var(--bg-page);
border-bottom: 1px solid var(--border-base);
}
.version-history-entry-head:focus-visible {
outline: 2px solid var(--c-run);
outline-offset: -3px;
}
.version-history-version {
display: inline-block;
flex-shrink: 0;
font-size: 13px;
padding: 3px 8px;
border: 1px solid var(--border-strong);
border-radius: 5px;
font-weight: 500;
color: var(--ink-mute);
}
.version-history-version.development {
border-color: var(--c-run-border);
color: var(--c-run);
}
.version-history-version.release {
border-color: #b1d7bd;
color: #24814e;
}
.version-history-badge {
display: inline-block;
padding: 2px 6px;
border-radius: 4px;
font-size: 11px;
white-space: nowrap;
flex-shrink: 0;
color: var(--ink-mute);
background: var(--bg-soft);
}
.version-history-badge.current {
color: #177244;
background: #eaf7ef;
}
.version-history-badge.pending,
.version-history-badge.development {
color: var(--c-run);
background: var(--c-run-bg);
}
.version-history-badge.release {
color: #24814e;
background: #eaf7ef;
}
.version-history-badge.warn {
color: #b42318;
background: #fff1ef;
}
.version-history-sha {
font-family: var(--font-mono, ui-monospace, monospace);
overflow-wrap: anywhere;
font-size: 12px;
}
.version-history-entry-head > .version-history-sha,
.version-history-entry-head time {
color: var(--ink-faint);
flex-shrink: 0;
font-size: 12px;
}
.version-history-subject {
flex: 1;
min-width: 80px;
font-size: 14px;
line-height: 1.6;
overflow-wrap: anywhere;
}
.version-history-toggle {
flex-shrink: 0;
font-size: 13px;
color: var(--c-run);
}
.version-history-detail {
padding: 16px;
min-width: 0;
}
.version-history-notes h4 {
margin: 0 0 12px;
font-size: 14px;
}
.version-history-change-row {
display: flex;
align-items: baseline;
gap: 12px;
margin: 0 0 12px;
font-size: 14px;
line-height: 1.8;
overflow-wrap: anywhere;
}
.version-history-change-row > span:last-child {
min-width: 0;
}
.version-history-change-tag {
flex-shrink: 0;
padding: 1px 7px;
border-radius: 4px;
font-size: 12px;
line-height: 1.6;
background: #eef2f6;
color: var(--ink-mute);
}
.version-history-change-tag.added {
background: #eaf7ef;
color: #177244;
}
.version-history-change-tag.fixed {
background: #fff3df;
color: #986000;
}
.version-history-change-tag.changed {
background: var(--c-run-bg);
color: var(--c-run);
}
.version-history-change-tag.security {
background: #fff1ef;
color: #b42318;
}
.version-history-notes code {
font-size: 12px;
background: var(--bg-soft);
border-radius: 3px;
padding: 1px 4px;
}
.version-history-reason,
.version-history-no-notes {
margin: 0;
font-size: 12px;
color: var(--ink-mute);
overflow-wrap: anywhere;
}
.version-history-reason {
padding: 0 16px 10px;
color: #986000;
}
.version-history-technical {
margin-top: 14px;
padding-top: 12px;
border-top: 1px solid var(--border-base);
font-size: 12px;
color: var(--ink-mute);
}
.version-history-technical summary {
cursor: pointer;
}
.version-history-technical dl {
display: grid;
gap: 10px;
margin: 12px 0;
}
.version-history-technical pre {
white-space: pre-wrap;
overflow-wrap: anywhere;
max-height: 320px;
overflow: auto;
font-size: 12px;
line-height: 1.7;
padding: 12px;
border: 1px solid var(--border-base);
border-radius: 6px;
background: var(--bg-page);
}
.version-history-links {
display: flex;
flex-wrap: wrap;
gap: 12px;
margin-top: 10px;
}
.version-history-more {
display: block;
margin: 18px auto 0;
}
@media (max-width: 1100px) {
.version-history-entry-head {
flex-wrap: wrap;
}
.version-history-subject {
flex-basis: 55%;
}
.version-history-build-grid {
grid-template-columns: 1fr 1fr;
}
.version-history-build-grid > div {
border-bottom: 1px solid var(--border-base);
}
}
@media (max-width: 760px) {
.version-history {
padding: 12px;
overflow-wrap: anywhere;
}
.version-history-header {
flex-direction: column;
align-items: stretch;
}
.version-history-header,
.version-history-current-card,
.version-history-records {
padding: 14px;
}
.version-history-entry-head {
flex-direction: column;
align-items: flex-start;
gap: 7px;
padding: 12px;
}
.version-history-entry-head > .version-history-badge {
align-self: flex-start;
}
.version-history-entry-head time {
white-space: normal;
}
.version-history-subject {
flex-basis: auto;
width: 100%;
}
.version-history-toggle {
align-self: flex-end;
}
.version-history-build-grid {
grid-template-columns: 1fr;
}
.version-history-build-grid > div {
border-right: 0;
}
.version-history-actions {
flex-wrap: wrap;
}
.version-history-detail {
padding: 12px;
}
.version-history-change-row {
gap: 8px;
}
.version-history,
.version-history-timeline,
.version-history-entry,
.version-history-subject,
.version-history-sha,
.version-history-reason {
max-width: 100%;
overflow-wrap: anywhere;
word-break: break-word;
}
.version-history-technical pre {
max-height: none;
}
}