Skip to content

Commit bc057a4

Browse files
committed
Style state variant notes as alerts
1 parent b1d5661 commit bc057a4

File tree

1 file changed

+37
-6
lines changed

1 file changed

+37
-6
lines changed

docs/source/docs/state-variants.blade.md

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ Similar to our [responsive prefixes](/docs/responsive-design), Tailwind makes it
88

99
## Hover
1010

11-
*By default, **hover variants are only generated for background color, border color, and text color utilities.** You can customize this in the [modules section](/docs/configuration#modules) of your configuration file.*
12-
1311
Add the `hover:` prefix to only apply a utility on hover.
1412

1513
@component('_partials.code-sample', ['lang' => 'html', 'class' => 'text-center'])
@@ -25,9 +23,20 @@ Add the `hover:` prefix to only apply a utility on hover.
2523
@endslot
2624
@endcomponent
2725

28-
## Focus
26+
<div class="bg-blue-light text-white font-semibold px-4 py-3 mb-4 -mt-2">
27+
<div class="flex">
28+
<div class="py-1">
29+
<svg class="fill-current h-6 w-6 text-white opacity-75 mr-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M10 20C4.477 20 0 15.523 0 10S4.477 0 10 0s10 4.477 10 10-4.477 10-10 10zm0-2c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zm-.5-5h1c.276 0 .5.224.5.5v1c0 .276-.224.5-.5.5h-1c-.276 0-.5-.224-.5-.5v-1c0-.276.224-.5.5-.5zm0-8h1c.276 0 .5.224.5.5V8l-.5 3-1 .5L9 8V5.5c0-.276.224-.5.5-.5z"/></svg>
30+
</div>
31+
<div>
32+
<p class="mb-2"><strong>By default, hover variants are only generated for background color, border color, and text color utilities.</strong></p>
33+
<p>You can customize this in the <a href="/docs/configuration#modules" class="underline">modules section</a> of your configuration file.</p>
34+
</div>
35+
</div>
36+
</div>
2937

30-
*By default, **focus variants are not generated for any utilities.** You can customize this in the [modules section](/docs/configuration#modules) of your configuration file.*
38+
39+
## Focus
3140

3241
Add the `focus:` prefix to only apply a utility on focus.
3342

@@ -41,10 +50,20 @@ Add the `focus:` prefix to only apply a utility on focus.
4150
@endslot
4251
@endcomponent
4352

53+
<div class="bg-blue-light text-white font-semibold px-4 py-3 mb-4 -mt-2">
54+
<div class="flex">
55+
<div class="py-1">
56+
<svg class="fill-current h-6 w-6 text-white opacity-75 mr-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M10 20C4.477 20 0 15.523 0 10S4.477 0 10 0s10 4.477 10 10-4.477 10-10 10zm0-2c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zm-.5-5h1c.276 0 .5.224.5.5v1c0 .276-.224.5-.5.5h-1c-.276 0-.5-.224-.5-.5v-1c0-.276.224-.5.5-.5zm0-8h1c.276 0 .5.224.5.5V8l-.5 3-1 .5L9 8V5.5c0-.276.224-.5.5-.5z"/></svg>
57+
</div>
58+
<div>
59+
<p class="mb-2"><strong>By default, focus variants are not generated for any utilities.</strong></p>
60+
<p>You can customize this in the <a href="/docs/configuration#modules" class="underline">modules section</a> of your configuration file.</p>
61+
</div>
62+
</div>
63+
</div>
4464

45-
## Group Hover
4665

47-
*By default, **group hover variants are not generated for any utilities.** You can customize this in the [modules section](/docs/configuration#modules) of your configuration file.*
66+
## Group Hover
4867

4968
If you need to style a child element when hovering over a specific parent element, add the `.group` class to the parent element and add the `group-hover:` prefix to the utility on the child element.
5069

@@ -63,6 +82,18 @@ If you need to style a child element when hovering over a specific parent elemen
6382
@endslot
6483
@endcomponent
6584

85+
<div class="bg-blue-light text-white font-semibold px-4 py-3 mb-4 -mt-2">
86+
<div class="flex">
87+
<div class="py-1">
88+
<svg class="fill-current h-6 w-6 text-white opacity-75 mr-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M10 20C4.477 20 0 15.523 0 10S4.477 0 10 0s10 4.477 10 10-4.477 10-10 10zm0-2c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zm-.5-5h1c.276 0 .5.224.5.5v1c0 .276-.224.5-.5.5h-1c-.276 0-.5-.224-.5-.5v-1c0-.276.224-.5.5-.5zm0-8h1c.276 0 .5.224.5.5V8l-.5 3-1 .5L9 8V5.5c0-.276.224-.5.5-.5z"/></svg>
89+
</div>
90+
<div>
91+
<p class="mb-2"><strong>By default, group hover variants are not generated for any utilities.</strong></p>
92+
<p>You can customize this in the <a href="/docs/configuration#modules" class="underline">modules section</a> of your configuration file.</p>
93+
</div>
94+
</div>
95+
</div>
96+
6697
## Combining with Responsive Prefixes
6798

6899
State variants are also responsive, meaning you can change an element's hover style for example at different breakpoints.

0 commit comments

Comments
 (0)