Repository navigation
ONE-88 Stage 2 · Design tokens + base components/layout refactor - #138
Merged
Merged
Conversation
…NE-88 Stage 2) - globals.css: full token set per frozen docs/design-system.md (font stacks, 8-step type scale, leading/weight/tracking, 4px spacing grid, light/dark shadow strategies, easings, durations, semantic colors incl. success/warning, radii); Tailwind v4 CSS-first via @theme, tailwind.config.js removed - body declares font-family (Inter Variable / JetBrains Mono Variable via fontsource, self-hosted, display:swap) - refactor ui/{button,card,badge,input,label,switch,dialog,otp-input} and layout/{DashboardLayout,AdminLayout} onto semantic tokens; tokenized focus ring (shadow-focus), transitions (duration/ease vars), dialog enter animation, prefers-reduced-motion downgrade
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
范围
Stage 2(ONE-108):把冻结契约
docs/design-system.md落到代码 —— 设计令牌 + 9 个基础组件 + 2 个 layout。不碰 pages/、不动 worker。改动
apps/web/src/styles/globals.css:CSS-first(@theme)落全部 10 组 token —— 字体族(Inter / JetBrains Mono,fontsource 自托管 variable 版,font-display: swap)、8 档字号阶梯 + 行高、字重、字距、4px 间距基网、明暗双策略阴影(暗色描边+微光)、4 条缓动、5 档时长、补全颜色(电蓝 primary、新增 success/warning)与圆角;body声明 font-family;新增 dialog 入场动画 + prefers-reduced-motion 降级。tailwind.config.js,token 单一来源;components.json同步。components/ui/{button,card,badge,input,label,switch,dialog,otp-input}与layout/{DashboardLayout,AdminLayout}:语义 token 替换硬编码(badge success 走--success,CardTitle 改 h2 档,导航激活态改 accent 语义,focus 统一shadow-focus光环,过渡统一 duration/ease token)。验证
pnpm -r build✅(tsc + vite,web & worker)biome lint .✅(103 files, no issues)pnpm test(web)✅ 54 pass / 0 fail