Skip to content

refactor: Variable層をTokens/Themeに分割#4

Merged
shunei-web merged 1 commit intomainfrom
refactor/tokens-theme-split
Mar 1, 2026
Merged

refactor: Variable層をTokens/Themeに分割#4
shunei-web merged 1 commit intomainfrom
refactor/tokens-theme-split

Conversation

@shunei-web
Copy link
Copy Markdown
Collaborator

@shunei-web shunei-web commented Mar 1, 2026

Summary

  • variable/ ディレクトリを tokens/(プリミティブ値)と theme/(セマンティック値)に分離
  • @layer 宣言を8層構成(tokens, theme, foundation, layout, component, project, animation, utility)に更新
  • ダークモード対応の基盤を確立(Theme層のみ差し替えで色・タイポグラフィを切替可能)

Changes

  • tokens/: oklch色、フォントスタック、数値スケール等の生の値を定義
  • theme/: --color-main 等のセマンティック変数でTokensを参照
  • layer-order.css: 7層 → 8層に更新
  • style.css: import パスを tokens/ + theme/ に変更

Test plan

  • pnpm build 成功
  • pnpm lint:css エラーなし
  • ブラウザで見た目に変化がないことを確認(Antigravity で検証)

Closes #3

🤖 Generated with Claude Code

デザイントークンのアーキテクチャを改善:
- variable/ → tokens/(プリミティブ値)+ theme/(セマンティック値)に分離
- Tokens層: oklch色、フォントスタック、数値スケール等の生値
- Theme層: --color-main等のセマンティック変数でTokensを参照
- @layer宣言を8層構成に更新(tokens, theme, foundation, ...)
- ダークモード対応の基盤(Theme層のみ差し替えで実現可能)

Closes #3

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@shunei-web shunei-web merged commit 3a08fcc into main Mar 1, 2026
@shunei-web shunei-web deleted the refactor/tokens-theme-split branch March 1, 2026 23:23
shunei-web added a commit that referenced this pull request Apr 11, 2026
… none 冗長削除

mflocss/spec PR#63 で確定した以下の変更に波及対応:

1. §5.5 SHOULD NOT から overflow 関連を削除(書籍委譲)
2. §5.5 SHOULD NOT を「外部レイアウト影響プロパティの排除」と
   「存在/不在制御の排除」の 2 つに分離

修正:
- c-accordion.css: 削除されたルール参照(overflow: hidden SHOULD NOT)
  を削除し、意図(border-radius クリッピング)のみ残す
- c-overlay.css: position: fixed 逸脱コメントを新ルール名
  「SHOULD NOT [外部レイアウト影響プロパティの排除]」に更新
- c-overlay.css: &[hidden] { display: none; } を削除
  (Reset 層で処理済み + SHOULD NOT [存在/不在制御の排除] に抵触)

同質問題: mflocss/wordpress-starter #4, #5
spec: mflocss/spec#63

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: Variable 層を Tokens + Theme に分割

1 participant