Color and Opacity
Tailwind lets you adjust the color and opacity of text.
Let’s talk about color first. Tailwind offers hundreds of color utilities out of the box, and those utilities behave similarly across many different color-related families of classes.
Text colors are of the pattern text-{color}. There’re three special colors: text-transparent, text-inherit, and text-current. The text-transparent class makes the text transparent, meaning you can see the background color through it. You can sometimes use this class for effect, especially with bg-clip-text, which makes the background match the shape of the text. The text-current and text-inherit options are both useful resets. text-inherit uses the color inherited from a parent. The text-current ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access