Text opacity
Utilities for controlling the opacity of an element's text color
Class reference
Usage
Control the opacity of an element’s text color using the .text-opacity-{amount}
utilities.
Note that because these utilities are implemented using CSS custom properties, a .text-{color}
utility must be present on the same element for them to work.
Don't try to use text opacity utilities on an inherited text color
Do make sure to add a text color utility to the same element explicitly
Responsive
To control an element’s text color opacity at a specific breakpoint, add a {screen}:
prefix to any existing text color opacity utility. For example, use md:text-opacity-50
to apply the text-opacity-50
utility at only medium screen sizes and above.
<div class="text-blue-500 text-opacity-75 md:text-opacity-50">
<!-- ... -->
</div>
For more information about Elements’ responsive design features, check out the Responsive Design documentation.
On this Page
v1.13.5