Text Opacity

Utilities for controlling an element's font-color opacity.

The ability to control an element's color is only provided as a class. We do not provide variables to control this. The text opacity class resets the font color's alpha channel CSS variable value.

Usage

Use d-fco{n} to change a font-color's opacity. You can also change font-color's opacity on :hover, :focus, :focus-visible by using the respective h:d-fco{n}, f:d-fco{n}, fv:d-fco{n} prefixes.

Inheritance Constraints

Text opacity CSS Utilities won't be inherited by its children. A font-color utility class must be present on the same element to work.

Text opacity utility classes don't inherit colors.
Apply each utility class to the same element

Classes

Class
Output
.d-fco0 --fco: 0% !important;
.d-fco10 --fco: 10% !important;
.d-fco25 --fco: 25% !important;
.d-fco50 --fco: 50% !important;
.d-fco75 --fco: 75% !important;
.d-fco90 --fco: 90% !important;
.d-fco95 --fco: 95% !important;
.d-fco99 --fco: 99% !important;

Text Opacity documentation last updated Thursday, June 18, 2026