What this Bootstrap Utility API class does
Sets the CSS variable "--bs-text-opacity" which is used to control the opacity on the CSS property color.
This is used in the CSS rule as follows: color: rgba(var(--bs-primary-rgb),var(--bs-text-opacity))
.
Example usage & available classes
<div class="text-primary">This is default primary text</div>
<div class="text-primary text-opacity-75">This is 75% opacity primary text</div>
<div class="text-primary text-opacity-50">This is 50% opacity primary text</div>
<div class="text-primary text-opacity-25">This is 25% opacity primary text</div>
Example override
In the example override below, we are enabling the responsive option for the utility, which means it will be available per breakpoint.
"text-opacity": map-merge(
map-get($utilities, "text-opacity"),
(
responsive: true
)
)