Tailwind alias/rename utility?
I've got a theme color config that looks a little like this:
Is it possible to make it so I can just use
text-vivid
instead of text-text-vivid
?
Non-text
utilities should be unaffected, so bg-text-valid
if for some reason I want to color the background with the text-vivid
color.
I assume this can probably been done with a plugin, but I'm not sure. Is it possible? Are there any existing solutions?
Thanks 🙂2 Replies
Not super helpful, but what's the purpose of text in the name? If it's allowed to expand into other colour utilities, why not just call it vivid?
For that particular one, I guess that could work. But I also have things like
text-success
and bg-success
that would have name clashes if I try and make them both top-level