Press/to search

Patterns

Grid v1.0.8

Utilities for sets an element's background grid pattern.


Class

classcss
pattern
grid-sm
background-image: linear-gradient(currentColor 1px, transparent 1px), linear-gradient(to right, currentColor 1px, transparent 1px);

background-size: 10px 10px
pattern
grid-md
background-image: linear-gradient(currentColor 1px, transparent 1px), linear-gradient(to right, currentColor 1px, transparent 1px);

background-size: 25px 25px
pattern
grid-lg
background-image: linear-gradient(currentColor 1px, transparent 1px), linear-gradient(to right, currentColor 1px, transparent 1px);

background-size: 50px 50px
pattern
grid-xl
background-image: linear-gradient(currentColor 1px, transparent 1px), linear-gradient(to right, currentColor 1px, transparent 1px);

background-size: 100px 100px

Usage

Set basic grid pattern.

<!-- Example -->
<y class="pattern grid-sm ... h-32 w-full">
...
</y>

Set pattern with color by using text-{color} utility. (See Text Color).

<!-- Example -->
<y class="pattern grid-sm text-amber-400 ... h-32 w-full">
...
</y>

Set pattern clipping with text.

TEXT
<!-- Example -->
<y class="pattern grid-sm clip-text text-red-500">
<y>
TEXT
</y>
</y>

Variant

ResponsiveDark ModeLight ModeReduce-MotionPortraitLandscapeHoverGroup-HoverFocusGroup-FocusFocus-VisibleFocus-WithinActiveVisitedCheckedDisabled

Default enabled variants. Read more information about the Responsive and Pseudo-Class Variants.