Files
perler-lab/perler-lab/src/ColorChartPage.css
T
Sisyphus 8d8f8beb33 ui: DESIGN.md v2.0 第二阶段 - 长尾页面 token 统一与对比度修复
- ChibiPage/ColorChartPage 移除作用域旧 token 重定义(同 pages.css 修复)
- 移除 .chibi-page/.chart-page button 特异性覆盖(琥珀底被清空的根因)
- 21 处琥珀底白字改暖墨字(chibi 9 + pages 12, 保留 danger/info/success 底白字)
- chibi 选中态推荐角标补白字(墨底); 色卡页品牌块统一琥珀底
- 导航高度 56→60 对齐全站; admin-code 11px→token
2026-08-25 12:21:08 +08:00

430 lines
8.8 KiB
CSS

/* =============================================================================
* PERLER LAB — 品牌色号表页 (/color-chart)
* v2.0 起 token 统一由 styles.css :root 提供,此处不再作用域重定义
* ========================================================================= */
.chart-page {
background: var(--bg-page);
color: var(--text-primary);
font-family: var(--font-sans);
font-size: var(--text-md);
line-height: 1.6;
min-height: 100vh;
-webkit-font-smoothing: antialiased;
}
.chart-page *,
.chart-page *::before,
.chart-page *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
.chart-page a {
color: inherit;
text-decoration: none;
}
/* ═══════════════════════ NAV ═══════════════════════ */
.chart-nav {
position: sticky;
top: 0;
z-index: 100;
height: 60px;
background: var(--bg-card);
border-bottom: 1px solid var(--border);
}
.chart-nav-inner {
max-width: 1280px;
height: 100%;
margin: 0 auto;
padding: 0 24px;
display: flex;
align-items: center;
gap: var(--space-5);
}
.chart-nav-back {
display: inline-flex;
align-items: center;
gap: 6px;
height: var(--touch-min-sm);
padding: 0 var(--space-2);
color: var(--text-secondary);
font-size: var(--text-md);
font-weight: 500;
border-radius: var(--radius-sm);
transition: color .15s ease;
}
.chart-nav-back:hover {
color: var(--text-primary);
}
.chart-brand {
display: inline-flex;
align-items: center;
gap: var(--space-2);
font-size: var(--text-lg);
font-weight: 700;
letter-spacing: .02em;
color: var(--text-primary);
}
.chart-brand-mark {
display: inline-flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
border-radius: var(--radius-sm);
background: var(--accent);
color: var(--text-primary);
font-size: var(--text-md);
font-weight: 700;
}
.chart-nav-spacer {
flex: 1;
}
.chart-nav-badge {
display: inline-flex;
align-items: center;
gap: var(--space-1);
height: 24px;
padding: 0 var(--space-2);
border: 1px solid var(--border-strong);
border-radius: var(--radius-full);
color: var(--text-secondary);
font-size: var(--text-xs);
letter-spacing: .08em;
}
/* ═══════════════════════ HERO ═══════════════════════ */
.chart-hero {
max-width: 1280px;
margin: 0 auto;
padding: var(--space-6) var(--space-5) var(--space-5);
text-align: center;
}
.chart-h1 {
font-size: var(--text-hero);
font-weight: 700;
letter-spacing: .01em;
line-height: 1.25;
color: var(--text-primary);
}
.chart-sub {
margin-top: var(--space-3);
font-size: var(--text-lg);
color: var(--text-secondary);
max-width: 640px;
margin-inline: auto;
}
/* ═══════════════════════ MAIN ═══════════════════════ */
.chart-main {
max-width: 1280px;
margin: 0 auto;
padding: var(--space-2) var(--space-5) var(--space-6);
}
/* ── 品牌切换 Tab ── */
.chart-tabs {
display: flex;
flex-wrap: wrap;
gap: var(--space-2);
justify-content: center;
margin-bottom: var(--space-5);
}
.chart-tab {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 2px;
min-width: 128px;
padding: var(--space-3) var(--space-4);
border: 1px solid var(--border);
border-radius: var(--radius-md);
background: var(--bg-card);
color: var(--text-secondary);
transition: border-color .15s ease, color .15s ease, background .15s ease;
text-align: left;
}
.chart-tab:hover {
border-color: var(--border-strong);
color: var(--text-primary);
}
.chart-tab.is-selected {
border-color: var(--accent);
background: var(--accent-soft);
color: var(--text-primary);
}
.chart-tab-name {
font-size: var(--text-lg);
font-weight: 600;
color: inherit;
}
.chart-tab-meta {
font-size: var(--text-sm);
color: var(--text-tertiary);
}
.chart-tab-count {
margin-top: var(--space-1);
font-size: var(--text-xs);
font-weight: 500;
color: var(--accent-hover);
font-family: var(--font-mono);
}
/* ── 色号表卡片 ── */
.chart-table-card {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-card);
padding: var(--space-4);
}
.chart-table {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: var(--space-2);
}
.chart-row {
display: flex;
align-items: center;
gap: var(--space-2);
padding: var(--space-2);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
background: var(--bg-hover);
min-width: 0;
}
.chart-swatch {
flex: 0 0 34px;
width: 34px;
height: 34px;
border-radius: var(--radius-sm);
border: 1px solid rgba(23, 23, 19, 0.12);
box-shadow: var(--shadow-card);
}
.chart-code {
flex: 1 1 auto;
min-width: 0;
font-family: var(--font-mono);
font-size: var(--text-md);
font-weight: 600;
color: var(--text-primary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.chart-hex {
flex: 0 0 auto;
font-family: var(--font-mono);
font-size: var(--text-xs);
color: var(--text-tertiary);
}
.chart-name {
flex: 0 0 auto;
font-size: var(--text-xs);
color: var(--text-tertiary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 110px;
}
.chart-empty {
padding: var(--space-6);
text-align: center;
color: var(--text-disabled);
}
/* ── 品牌互链(SEO 内链,6 品牌 + 回首页) ── */
.chart-crosslinks {
margin-top: var(--space-5);
padding: var(--space-4);
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-card);
}
.chart-crosslinks-title {
font-size: var(--text-md);
font-weight: 600;
color: var(--text-secondary);
margin-bottom: var(--space-3);
}
.chart-crosslinks-list {
display: flex;
flex-wrap: wrap;
gap: var(--space-2);
}
.chart-crosslink {
display: inline-flex;
align-items: baseline;
gap: var(--space-2);
min-height: var(--touch-min-sm);
padding: var(--space-1) var(--space-3);
border: 1px solid var(--border);
border-radius: var(--radius-full);
color: var(--text-secondary);
font-size: var(--text-sm);
transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.chart-crosslink:hover {
border-color: var(--accent);
color: var(--text-primary);
}
.chart-crosslink.is-current {
border-color: var(--accent);
background: var(--accent-soft);
color: var(--text-primary);
font-weight: 600;
}
.chart-crosslink-name {
white-space: nowrap;
}
.chart-crosslink-count {
font-family: var(--font-mono);
font-size: var(--text-xs);
color: var(--text-tertiary);
}
.chart-crosslinks-home {
display: inline-block;
margin-top: var(--space-3);
font-size: var(--text-sm);
font-weight: 500;
color: var(--text-secondary);
}
.chart-crosslinks-home:hover {
color: var(--text-primary);
}
/* ═══════════════════════ FOOTER ═══════════════════════ */
.chart-footer {
border-top: 1px solid var(--border);
background: var(--bg-card);
}
.chart-footer-inner {
max-width: 1280px;
margin: 0 auto;
padding: var(--space-5) var(--space-4);
display: flex;
justify-content: space-between;
align-items: center;
gap: var(--space-4);
flex-wrap: wrap;
}
.chart-footer-text {
font-size: var(--text-sm);
color: var(--text-tertiary);
}
.chart-footer-link {
font-size: var(--text-sm);
font-weight: 500;
color: var(--text-secondary);
}
.chart-footer-link:hover {
color: var(--text-primary);
}
/* ═══════════════════════ RESPONSIVE ═══════════════════════ */
@media (max-width: 720px) {
.chart-nav-inner {
padding: 0 var(--space-3);
gap: var(--space-3);
}
.chart-nav-badge {
display: none;
}
.chart-hero {
padding: var(--space-5) var(--space-4) var(--space-4);
}
.chart-h1 {
font-size: 26px;
}
.chart-sub {
font-size: var(--text-md);
}
.chart-main {
padding: var(--space-2) var(--space-3) var(--space-5);
}
.chart-tabs {
justify-content: stretch;
}
.chart-tab {
flex: 1 1 44%;
min-width: 0;
align-items: center;
text-align: center;
padding: var(--space-2) var(--space-3);
}
.chart-table {
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
gap: var(--space-1);
}
.chart-row {
padding: var(--space-1);
gap: var(--space-1);
}
.chart-swatch {
flex-basis: 28px;
width: 28px;
height: 28px;
}
.chart-name {
display: none;
}
}