Skip to content

Conversation

crswll
Copy link

@crswll crswll commented Mar 28, 2025

This PR adds a small section to the CustomizingYourThemeColors component to document how to add colors for a certain property specifically.

Verified the prefixes with: https://play.tailwindcss.com/YubNFhoMJN?layout=horizontal

Copy link

vercel bot commented Mar 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tailwindcss-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 28, 2025 0:54am

@crswll crswll changed the title Document specific theme keys Document theme keys for property specific colors Mar 28, 2025
@scottbedard
Copy link

Officially supporting these undocumented namespaces would be very helpful!

My team and I would like to use --background-color, --border-color, and --text-color, but are not comfortable doing so yet because it's undocumented. Would tests also be required to officially support these?

Related conversations: tailwindlabs/tailwindcss#17400, tailwindlabs/tailwindcss#17401

philipp-spiess pushed a commit to tailwindlabs/tailwindcss that referenced this pull request Apr 11, 2025
There are several property-specific color variables available to
maintain compatibility with v3. [My team and I would like to use
them](#17400),
but would feel more comfortable if they were formally supported by v4.
This PR adds test coverage for those features.

@RobinMalfait has confirmed that these features are not intended to be
removed, [see conversation here
→](https://discord.com/channels/486935104384532500/546706299010678784/1355213322995110171)

@crswll Has opened a PR here for the related documentation
- tailwindlabs/tailwindcss.com#2178
@gmoniava
Copy link

gmoniava commented Jun 24, 2025

Related discussion.

@philipp-spiess
Copy link
Member

Hey! I was looking into this today and prepared an exhaustive list but the full list ends up being extremely long and not really useful so for now we're not going to make changes to the website. I did, however, use my research and upload it to a GitHub Gist so here's the definitive version as of Tailwind CSS v4.1: https://gist.github.com/philipp-spiess/83101e0d0fce4d70fa080dbf31560894

Thank you for the PR though!

@crswll
Copy link
Author

crswll commented Sep 11, 2025

Nice! Yeah, I compiled a similar one.

I just thought specifically the color based ones would go a long way. I know I use color specific ones regularly.

Did you consider maybe a link to the gist around here or would that be weird? https://tailwindcss.com/docs/theme#default-theme-variable-reference

@rozsazoltan
Copy link
Contributor

rozsazoltan commented Sep 14, 2025

Nice list 🎉, @philipp-spiess, maybe a link reference your gist should be added in the docs? Quite a lot of people are looking mainly for solutions with --background-color-*, --border-color-*, and --text-color-* (since they don't know these exist, they try to achieve them with --color-{something}-*). Though I'm not sure - Google might already surface it, as there are so many answers related to this, but somehow the question always ends up on GitHub, StackOverflow, or Reddit.

Btw I'm just speaking from memory, but I've answered such questions dozens of times, even before my own PR. I think people are most often looking for the specific color-namespaces.

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.

5 participants