mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
1.2 KiB
1.2 KiB
| extends | title | description | features | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| _layouts.documentation | Text Color | Utilities for controlling the text color of an element. |
|
@include('_partials.work-in-progress')
@include('_partials.class-table', [ 'rows' => $page->config['colors']->map(function ($value, $name) { $class = ".text-{$name}"; $code = "color: {$value};"; $color = implode(' ', array_reverse(explode('-', $name))); $description = "Set the text color of an element to {$color}."; return [ $class, $code, $description, ]; })->values()->all() ])
Hover
In addition to the standard responsive variations, text colors also come in hover: variations that apply the given text color on hover.
@component('_partials.code-sample', ['class' => 'text-center']) Button @endcomponent
Hover utilities can also be combined with responsive utilities by adding the responsive {screen}: prefix before the hover: prefix.
<button class="... md:text-blue md:hover:text-red ...">Button</button>