feat: デザイントークンを確定する - #76
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughデザイン正本の参照を更新し、ダークテーマの配色、フォント、角丸を確定した。ログイン画面とボトル関連画面の見出しに見出し書体を適用した。 Changesデザイントークン適用
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
関連 issue
resolve #58
やったこと
概要
モックの正本(Claude Design)から配色・書体・角丸を採り、
globals.cssのトークンとして確定した。ダークを既定にし、以降の UI 作業(#59 #61 #65 #66 #67 #68)が参照する土台にする。変更点
globals.cssの.darkにモックの実値 17 個を oklch で定義。--radius: 1rem、color-scheme: dark:root(shadcn 既定のライト)と--chart-3〜5は温存<html>にdarkを付与--font-headingを--font-sansの別名から自前の変数へ変え、既存の<h1>5 箇所に適用docs/requirements.md「保留」にライト/ダーク切り替えを追加受け入れ条件(セルフチェック)
.darkに入っている(破壊的操作・グラフの色も含む)--radiusがモックに合っているcolor-schemeも dark になっている--font-headingが--font-sansの別名でない)<h1>が見出し書体になっているsrc/app/配下の画面が生カラーを持たない動作確認
pnpm lintが通るpnpm format:checkが通るpnpm typecheckが通るpnpm testが通る(71 件)検証
目視ではなく数値で確認した。
1. oklch 変換の検算 — oklch から sRGB へ逆変換し、正本の hex に戻ることを全 10 色で確認。ずれ 0。
2. ブラウザが実際に描いた色 — ヘッドレス Chrome で
/loginを撮り、PNG をデコードして全 329,160 px を集計。3. 日本語グリフ —
subsets: ["latin"]でも日本語が出ることをビルド成果物で確認。woff2 が 607 個、unicode-range宣言 363 個のうち 291 個がかな・漢字の範囲を含む。4. モバイル幅 — 390px の iframe に入れて撮影。横あふれなし、左右余白 27px。
Issue 要件外の対応(あれば)
font-medium(500)はコードベースで最多の 9 箇所あり、shadcn のラベル・ボタンが使っている。500 を読まないと CSS のフォントマッチングで 400 に落ち、ラベルとボタンの太さの差が消えるため。正本側も 500 を 9 箇所で使っているdocs/requirements.md「保留」への追加。Issue のスコープ外が「requirements.md「保留」」を参照しているが、その行が存在しなかったため備考
:rootのライト定義を残しているのは、ダーク値を:rootへ移して.darkを消すと shadcn 生成物のdark:(7 ファイル・30 箇所)が無言で効かなくなるため。切り替え機能自体は「保留」