Skip to content

Tailwindとの名前かぶりの問題を解決、不要な設定を削除#9549

Merged
machida merged 7 commits intomainfrom
container
Jan 23, 2026
Merged

Tailwindとの名前かぶりの問題を解決、不要な設定を削除#9549
machida merged 7 commits intomainfrom
container

Conversation

@machida
Copy link
Copy Markdown
Member

@machida machida commented Jan 23, 2026

Summary by CodeRabbit

  • リファクタリング

    • コンテナの制約を固定幅からmax-widthベースに変更し、より柔軟な配置を実現しました。
  • スタイル

    • スタイル内でコンテナサイズのデフォルトを初期化するテーマ宣言とソース指定を追加しました。
    • hidden属性/クラスで要素を非表示にするルールを追加しました。
    • 小ボタンの横パディングとバッジの単位を調整、ヘッダー内アクションやページ内余白、サイドナビのレスポンシブ挙動を改善しました。
    • 感情アイコンをインライン表示に変更し、ユーザーカード表示のマージン適用方法を小修正しました。
  • 雑務

    • 外部スタイル処理設定(PostCSS/Tailwind)と関連パッケージを削除しました。

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 23, 2026

📝 Walkthrough

Walkthrough

PostCSS と Tailwind の設定を削除し、複数のスタイルシートから @config "../../../tailwind.config.js" を除去して @source "./**/*.css"@theme { --container-*: initial; } を追加。いくつかのコンテナ幅を widthmax-width に変更し、複数の表示制御やレスポンシブ調整を追加・整理。

Changes

Cohort / File(s) 変更概要
Tailwind/PostCSS 設定削除
postcss.config.js, tailwind.config.js, package.json
postcss.config.jstailwind.config.js を削除。また package.json から postcsspostcss-importpostcss-loadertailwindcss 等の依存を削除
@config 削除 / @source@theme 追加
app/assets/stylesheets/application.css, app/assets/stylesheets/lp.css, app/assets/stylesheets/not-logged-in.css
各ファイルから @config "../../../tailwind.config.js" を削除し、@source "./**/*.css";@theme { --container-*: initial; } を追加
コンテナ幅挙動変更
app/assets/stylesheets/shared/layouts/_container.css
.container.is-sm.container.is-xxswidthmax-width に変更(固定幅→最大幅)
表示制御ルール追加
app/assets/stylesheets/application/blocks/reaction/_reaction.css, app/assets/stylesheets/atoms/_a-overlay.css
.reactions__items[hidden].reactions__users-list.hidden.a-overlay.is-js.hiddendisplay: none; を追加
ページレイアウトとサイドナビのレスポンシブ調整
app/assets/stylesheets/application/blocks/page/_page-body.css, app/assets/stylesheets/atoms/_a-side-nav.css
@media (min-width: 64em).page-body__inner.has-side-nav の padding-right と .a-side-nav の絶対配置/幅/境界、内部の sticky レイアウトを追加
ページヘッダーアクション整理 / ボタン調整
app/assets/stylesheets/application/blocks/page-content/_page-content-header-actions.css, app/assets/stylesheets/application/blocks/page-content/_page-content-header.css, app/assets/stylesheets/atoms/_a-button.css
無効なセレクタ削除、ヘッダーアクションの flex ルール整理、.a-button.is-smpadding-inline を縮小
小さなスタイル調整
app/assets/stylesheets/atoms/_a-badge.css, app/assets/stylesheets/shared/blocks/card-list/_card-list-item-title.css
.a-badge.is-xs の高さ単位を remem に変更、.card-list-item-title__emotion-imagedisplay: inline を追加
ビューのクラス指定調整
app/views/companies/users/_user.html.slim, app/views/generations/_user_activity_counts.html.slim, app/views/users/_user.html.slim
.card-counts.is-users に対する mt-3 をユーティリティクラスから class='!mt-3' に変更(重要度付きクラスに切替)

Sequence Diagram(s)

(該当なし)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • komagata

Poem

🐰
古い設定は風にながれ、僕はぴょんと跳ねる、
コンテナの境界はゆるくなり、景色は広がる、
見せるものは整い、隠すものはそっと消え、
小さな調整に鼻をヒクヒク、幸せをひとつ残す。

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning プルリクエストの説明が完全に欠落しており、リポジトリで定義されているテンプレートの必須セクション(Issue番号、概要、変更確認方法、スクリーンショット)が提供されていません。 プルリクエストの説明を追加し、テンプレートに従ってIssue番号、変更内容の概要、確認方法、必要に応じてスクリーンショットを記入してください。
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed プルリクエストのタイトルは、Tailwindの削除と設定の簡潔化という主要な変更を正確に反映しており、変更セットの主な目的を明確に説明しています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@postcss.config.js`:
- Around line 1-5: ビルドが失敗しているのは CSS が Tailwind をインポートしているのに Tailwind
がプロジェクトから削除されているためです。postcss.config.js に Tailwind を処理するプラグインを追加し、package.json に
tailwindcss を復元してインストールし、プロジェクトルートに tailwind.config.js
を作成してください(postcss.config.js に require('tailwindcss') と通常は
require('autoprefixer') を追加)、また application.css / not-logged-in.css / lp.css の
`@import` "tailwindcss" エントリが意図した通りであることを確認してください。
🧹 Nitpick comments (1)
app/assets/stylesheets/shared/layouts/_container.css (1)

22-29: .container.is-xsmax-widthに変更すべきでは?

.is-sm.is-xxsmax-widthに変更されましたが、.is-xs(26行目)はまだwidth: 32rem;のままです。一貫性のため、こちらもmax-widthに変更することを検討してください。

♻️ 修正案
 .container.is-xs {
-  width: 32rem;
+  max-width: 32rem;
 }

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@app/assets/stylesheets/application/blocks/page/_page-body.css`:
- Around line 31-35: The duplicated padding-right declarations in the `@media`
(min-width: 64em) rule for the .page-body__inner.has-side-nav selector trigger
Biome's noDuplicateProperties; replace the two lines with a single declaration
using var() fallback so it reads padding-right: var(--side-nav-width, 17rem)
(i.e., collapse the fallback into the var() call inside the same rule).

In `@app/assets/stylesheets/atoms/_a-side-nav.css`:
- Around line 27-33: .a-side-nav__inner has duplicate top declarations inside
the `@media` rule (top: 3.125rem; and top: var(--header-height__md-up);) which
triggers Biome lint errors; replace the two lines with a single fallback form
using var() (e.g., top: var(--header-height__md-up, 3.125rem);), removing the
duplicate so .a-side-nav__inner only defines top once.

Comment on lines +31 to +35
@media (min-width: 64em) {
.page-body__inner.has-side-nav {
padding-right: 17rem;
padding-right: var(--side-nav-width);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

重複プロパティでBiomeがエラーになるため、var()のフォールバックに統一してください。

現在はフォールバック目的の二重指定ですが、BiomeのnoDuplicatePropertiesに引っかかるため、1行にまとめると安全です。

✅ 修正案
 .page-body__inner.has-side-nav {
-  padding-right: 17rem;
-  padding-right: var(--side-nav-width);
+  padding-right: var(--side-nav-width, 17rem);
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@media (min-width: 64em) {
.page-body__inner.has-side-nav {
padding-right: 17rem;
padding-right: var(--side-nav-width);
}
`@media` (min-width: 64em) {
.page-body__inner.has-side-nav {
padding-right: var(--side-nav-width, 17rem);
}
🧰 Tools
🪛 Biome (2.1.2)

[error] 34-34: Duplicate properties can lead to unexpected behavior and may override previous declarations unintentionally.

padding-right is already defined here.

Remove or rename the duplicate property to ensure consistent styling.

(lint/suspicious/noDuplicateProperties)

🤖 Prompt for AI Agents
In `@app/assets/stylesheets/application/blocks/page/_page-body.css` around lines
31 - 35, The duplicated padding-right declarations in the `@media` (min-width:
64em) rule for the .page-body__inner.has-side-nav selector trigger Biome's
noDuplicateProperties; replace the two lines with a single declaration using
var() fallback so it reads padding-right: var(--side-nav-width, 17rem) (i.e.,
collapse the fallback into the var() call inside the same rule).

Comment on lines +27 to +33
@media (min-width: 64em) {
.a-side-nav__inner {
max-height: 100%;
position: sticky;
top: 3.125rem;
top: var(--header-height__md-up);
display: flex;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

topの二重指定はBiomeエラーになるのでvar()フォールバックに統一してください。

フォールバック意図は理解できますが、重複プロパティはlintエラーになるため1行にまとめるのが安全です。

✅ 修正案
 .a-side-nav__inner {
-  top: 3.125rem;
-  top: var(--header-height__md-up);
+  top: var(--header-height__md-up, 3.125rem);
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@media (min-width: 64em) {
.a-side-nav__inner {
max-height: 100%;
position: sticky;
top: 3.125rem;
top: var(--header-height__md-up);
display: flex;
`@media` (min-width: 64em) {
.a-side-nav__inner {
max-height: 100%;
position: sticky;
top: var(--header-height__md-up, 3.125rem);
display: flex;
🧰 Tools
🪛 Biome (2.1.2)

[error] 32-32: Duplicate properties can lead to unexpected behavior and may override previous declarations unintentionally.

top is already defined here.

Remove or rename the duplicate property to ensure consistent styling.

(lint/suspicious/noDuplicateProperties)

🤖 Prompt for AI Agents
In `@app/assets/stylesheets/atoms/_a-side-nav.css` around lines 27 - 33,
.a-side-nav__inner has duplicate top declarations inside the `@media` rule (top:
3.125rem; and top: var(--header-height__md-up);) which triggers Biome lint
errors; replace the two lines with a single fallback form using var() (e.g.,
top: var(--header-height__md-up, 3.125rem);), removing the duplicate so
.a-side-nav__inner only defines top once.

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.

1 participant