refactor(styles): prefers-contrast: more をテーマトークンに集約#176
Merged
Conversation
24 個のパターン CSS から @media (prefers-contrast: more) ブロックを削除し、 global.css の :root / .dark でテーマ変数を高コントラスト版に上書きする方式に集約。 これにより black / white / #facc15 のパターン個別ハードコードが撲滅され、 今後 prefers-contrast: more 用のスタイル更新はテーマ層 1 箇所で完結する。 - src/styles/global.css: @media (prefers-contrast: more) で :root と .dark の CSS 変数を OKLCH の高コントラスト版に上書き(--input は dark + more で 0.55 に下げて switch track と white thumb の対比を確保) - src/styles/patterns/*.css (23 ファイル) と src/patterns/menubar/menubar.css: @media (prefers-contrast: more) ブロックを削除(forced-colors: active は維持) - src/styles/patterns/switch.css: thumb の background: white を background: var(--background) に変更してテーマ追従 - CODING_RULES.md: prefers-contrast の値ガイドを追記(high / low は仕様外) - src/styles/patterns/tabs.css: forced-colors の selected 表現を SelectedItem ボーダーに変更、:focus → :focus-visible に整理 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
冗長な目標リスト、Astro リビルド版という過渡的な記述、移行状況セクションを削除。 コマンド一覧は package.json の scripts を参照する形に集約。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Deploying apg-patterns-examples with
|
| Latest commit: |
cf00101
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://caa3a330.apg-patterns-examples.pages.dev |
| Branch Preview URL: | https://refactor-prefers-contrast-th.apg-patterns-examples.pages.dev |
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
`prefers-contrast: more` のスタイル更新は今後テーマ層 1 箇所で完結。`forced-colors: active` ブロックは別系統として維持。`CLAUDE.md` の整理は別コミットで含めている。
Test plan
🤖 Generated with Claude Code