Files
knowledge-governance/web/src/versionHistory.css
T
姚章浩 ce02ae4eef
build / build (push) Successful in 1m5s
fix(ui): 优化版本记录信息卡与折叠列表
按参考图分层展示真实构建、紧凑版本条目与分类变更,当前条目默认展开;增加只读刷新,原始提交和权限保持。

验证:构建信息卡、紧凑展开和安全变更分类三组回归分别先红后绿,23项版本相关测试与类型检查通过;完整门禁、候选及上线验收待执行。
2026-10-24 15:40:50 +08:00

411 lines
8.4 KiB
CSS

/* Version records: build identity first, then compact commit accordions. */
.version-history {
display: flex;
flex-direction: column;
gap: 18px;
min-width: 0;
padding: 24px;
color: var(--ink-base);
}
.version-history-header,
.version-history-current-card,
.version-history-records {
background: var(--bg-panel, #fff);
border: 1px solid var(--border-base, #e2e8f0);
border-radius: 10px;
padding: 20px;
min-width: 0;
}
.version-history-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
}
.version-history h2 {
margin: 0 0 4px;
font-size: 22px;
}
.version-history h3 {
margin: 0;
font-size: 18px;
}
.version-history-header p,
.version-history-records-heading p {
margin: 0;
color: var(--ink-mute, #64748b);
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, #e2e8f0);
background: var(--bg-page, #f8fafc);
}
.version-history-build-grid > div {
padding: 12px 14px;
min-width: 0;
border-right: 1px solid var(--border-base, #e2e8f0);
}
.version-history-build-grid > div:last-child {
border-right: 0;
}
.version-history dt {
color: var(--ink-mute, #64748b);
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, #64748b);
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, #64748b);
font-size: 12px;
}
.version-history-notice {
padding: 10px 14px;
border-radius: 6px;
background: var(--c-run-bg, #eff6ff);
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, #2563eb);
background: var(--c-run-bg, #eff6ff);
border-color: var(--c-run-border, #bfdbfe);
}
.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, #e2e8f0);
border-radius: 8px;
background: var(--bg-panel, #fff);
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, #f8fafc);
}
.version-history-entry-head[aria-expanded='true'] {
background: var(--bg-page, #f8fafc);
border-bottom: 1px solid var(--border-base, #e2e8f0);
}
.version-history-entry-head:focus-visible {
outline: 2px solid var(--c-run, #2563eb);
outline-offset: -3px;
}
.version-history-version {
display: inline-block;
flex-shrink: 0;
font-size: 13px;
padding: 3px 8px;
border: 1px solid var(--border-strong, #cbd5e1);
border-radius: 5px;
font-weight: 500;
color: var(--ink-mute);
}
.version-history-version.development {
border-color: #b4d1f5;
color: #2465aa;
}
.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: #2465aa;
background: #eff6ff;
}
.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, #7c8c9f);
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, #2563eb);
}
.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: #536275;
}
.version-history-change-tag.added {
background: #eaf7ef;
color: #177244;
}
.version-history-change-tag.fixed {
background: #fff3df;
color: #986000;
}
.version-history-change-tag.changed {
background: #eff6ff;
color: #2465aa;
}
.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;
}
}