Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Document how to create custom utility classes and override them for different themes without confusion due to namespaces (Tailwind 4)

オープン
#2,292 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
tailwindcss
領域
documentation

調査の方向性

Start by reading the issue examples and the linked discussion, then inspect the Tailwind v4 documentation covering @theme and custom variants. Determine the recommended namespace approach for theme-specific custom utilities; the work is done when the relevant docs explain it clearly with an example and avoid the naming confusion described here.

索引モデルが issue の本文から書いたものです。

説明

Imagine I want to have several custom utility classes - such as button-default-background or button-default-border - and also override them during dark mode (because I suppose this is one approach to create apps which support themes).

Now I could do it in following way based on tailwind 4 docs:

@custom-variant dark (&:where(.dark, .dark *));

@theme {
  --color-button-default-background: #eb6bd8;
}

@layer base {
 * {
   @variant dark {
     --color-button-default-background: #8e0d7a;
   }
 }
}

But it would generate utilities like bg-button-default-background and text-button-default-background right? However having value named: text-button-default-background seems a bit strange (usage of text and background in the same word) isn't it?

Current docs don't mention how to solve this problem.

In this discussion there was suggestion how to solve this, so can we put this information in the docs, if that's the best way to implement this using tailwind 4?

主要言語
MDX
スター
150
フォーク
78
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

tailwindlabs/tailwindcss.com のほかの issue

tailwindlabs/tailwindcss.com の issue をすべて見る

似ている issue

Documentation の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。