Z-Index
Stacking-order utilities using a deliberately spread-out numeric scale, so there's always room to slot a new layer between two existing ones.
Scale
.z-{1-9} maps to a triple-digit value rather than a plain 1–9 - leaving headroom to insert custom z-index values between framework layers without a rewrite.
Preview - stacked, offset boxes
z-1
z-3
z-2
<div class="absolute z-1">Back</div>
<div class="absolute z-3">Front</div>
| Class | z-index |
|---|---|
.z-1 | 111 |
.z-2 | 222 |
.z-3 | 333 |
.z-4 | 444 |
.z-5 | 555 |
.z-6 | 666 |
.z-7 | 777 |
.z-8 | 888 |
.z-9 | 999 |
Requires positioning.z-indexonly affects positioned elements - pair.z-{n}with.relative,.absolute,.fixed, or.stickyfrom the Position utilities.
Responsive variants included..z-{n}is generated throughgenerate-utils, so every breakpoint-prefixed copy (md:z-3,lg:z-9, …) is available too.