Document how to create custom utility classes and override them for different themes without confusion due to namespaces (Tailwind 4)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- tailwindcss
- Lĩnh vực
- documentation
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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?
- Ngôn ngữ chính
- MDX
- Star
- 150
- Fork
- 78
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của tailwindlabs/tailwindcss.com
-
Home page: Gradients card gets clippedCó thể đã có người làm @wiscaksono đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
tailwindlabs/tailwindcss.com#2532 ·
-
Theme variables page doesn't explain how to override values for a dark themeCó thể đã có người làm @oyobbeb đã nhận 4 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
tailwindlabs/tailwindcss.com#2526 ·
-
No central documentation of options @import optionsCó thể đã có người làm @MHJahanbakhsh đã nhận 75 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
tailwindlabs/tailwindcss.com#2514 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
tailwindlabs/tailwindcss.com#2497 · 3 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
tailwindlabs/tailwindcss.com#2493 ·
Tất cả issue của tailwindlabs/tailwindcss.com
Issue tương tự
-
documentation
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 90/100
ivopogace/opencode-courier#422 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
beyondgrep/ack3#413 ·
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
chapel-lang/chapel-vscode#156 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`max_tokens` is silently ignored on Ollama because `OllamaProvider` sends `max_completion_tokens`Đang mởpydanty:is-working
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
pydantic/pydantic-ai#12066 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Broken link to Authors' GuideĐang mởbug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100