Are the text-opacity classes deprecated? #7512
Replies: 2 comments
-
Kinda undecided, we stopped documenting just to sort of see how much we'd hear about it and find out about situations where it's really necessary. No actual plans to remove them I don't think, but if they didn't already exist we probably wouldn't reintroduce them. CSS variables are sort of expensive at run-time if you get really carried away with them (especially in Safari) so it would be nice to be able to give something a background color without adding a variable just in case someone wants to set the opacity. |
Beta Was this translation helpful? Give feedback.
-
Seems like this has now been removed in Tailwind v4, and the migration tool didn't pick it up. I have an
It's easily resolvable, I just replaced |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I noticed the
text-opacity-###
classes are no longer mentioned in the Tailwind 3 docs. Just curious whether this was intentionally left out, an oversight, or just didn't get to it perhaps? I do find the text opacity classes helpful in cases where the context (say within a component) isn't afforded the current color, or simply not having to redeclare the color for the sake of cleanliness.Beta Was this translation helpful? Give feedback.
All reactions