refactor: govern CSS tokens and cascade

This commit is contained in:
leefer
2026-07-29 21:56:39 +08:00
parent 8d617cfa17
commit ed2b47fe90
11 changed files with 551 additions and 425 deletions
-43
View File
@@ -1,48 +1,5 @@
/* Canonical non-heaven design system. Question-to-Heaven remains isolated. */
/* ========== 小白复盘 · 打样设计系统 ========== */
:root{
--blue:#2563eb; --blue-d:#1d4ed8; --blue-soft:#eff4ff; --blue-line:#c7d8fb;
--up:#e04536; --up-soft:#fdecea; --down:#16a34a; --down-soft:#e9f7ee;
--amber:#b45309; --amber-soft:#fdf3e3;
--ink:#1f2937; --sub:#6b7280; --faint:#9ca3af;
--line:#e5e7eb; --line-soft:#eef0f3; --bg:#f4f5f7; --card:#fff;
--radius:10px;
--shadow:0 1px 2px rgba(16,24,40,.05);
/* Shell dimensions are tokens because data-heavy pages reuse them in viewport calculations. */
--sidebar-width:200px;
--topbar-height:46px;
--summary-height:34px;
--statusbar-height:30px;
--page-pad-y:14px;
--page-pad-x:16px;
--card-gap:12px;
--workspace-height:calc(100vh - var(--topbar-height) - var(--statusbar-height));
--content-height:calc(var(--workspace-height) - var(--summary-height));
--table-wide:1180px;
--table-medium:930px;
--table-compact:720px;
--col-rank:44px;
--col-date:94px;
--col-stock:160px;
--col-number:96px;
--col-action:96px;
--col-text:220px;
--right-rail-wide:372px;
--pool-table-max-height:calc(var(--content-height) - var(--topbar-height) - var(--page-pad-y) - var(--page-pad-y) - var(--card-gap));
--sentiment-history-max-height:510px;
--sentiment-history-min-height:220px;
--primary-share:1.45fr;
--secondary-share:.75fr;
--mobile-nav-height:58px;
--mobile-header-height:50px;
--mobile-tab-height:54px;
--mobile-shell-pad:8px;
--mobile-page-pad:10px;
--mobile-min-width:320px;
--space-4:4px;
--font-aux:10.5px;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{