refactor: Tailwind設定をtailwind-configパッケージに集約#280
Merged
Conversation
Tailwind CSS設定がapps/webとpackages/react-componentsで重複していたため、 packages/tailwind-configパッケージを作成して共通化。 変更内容: - packages/tailwind-configパッケージを新規作成 - globals.cssをtailwind.cssとしてパッケージのルートに配置 - package.jsonのstyleフィールドでtailwind.cssを指定 - apps/webとpackages/react-componentsのglobals.cssを更新 - @importでtailwind-configパッケージを参照 - @sourceディレクティブでスキャン対象ファイルを指定 - ADR-016を追加(Tailwind設定共通化の設計判断を文書化) メリット: - Single Source of Truth(テーマ定義を1箇所に集約) - メンテナンス性の向上 - apps/webとpackages/react-components間の一貫性保証 - 将来的なデザイントークンへの段階的な移行が可能 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <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.
概要
Tailwind CSS設定が
apps/webとpackages/react-componentsで重複していたため、packages/tailwind-configパッケージを作成して共通化しました。変更内容
新規作成
tailwind.css- Tailwind本体、プラグイン、テーマ定義を含む設定ファイルpackage.json-styleフィールドでtailwind.cssを指定変更ファイル
package.json-@next-lift/tailwind-config依存を追加src/app/globals.css-@importで共通設定を読み込み、@sourceディレクティブを追加package.json-@next-lift/tailwind-config依存を追加src/globals.css-@importで共通設定を読み込みドキュメント
メリット
技術詳細
package.jsonのstyleフィールドでCSSファイルを指定(標準的なCSSパッケージの構成)@tailwindcss/postcssの組み込みimport解決機能を利用(postcss-import不要)@sourceディレクティブでTailwindがスキャンすべきファイルを明示的に指定テスト計画
pnpm devでapps/webが正常に起動し、スタイルが適用されることを確認pnpm storybookでpackages/react-componentsのStorybookが正常に起動し、スタイルが適用されることを確認🤖 Generated with Claude Code