Stacking order utilities z-0 through z-50 plus z-auto — and the stacking-context rules that actually decide. This family contains 8 generated classes in Nakshora 3.1.

Classes#

ClassGenerated CSS
z-0z-index: 0;
z-10z-index: 10;
z-20z-index: 20;
z-30z-index: 30;
z-40z-index: 40;
z-50z-index: 50;
z-autoz-index: auto;
z-hidez-index: -1;

Example#

example
html
<header class="sticky top-0 z-50">…</header>
<dialog class="z-[100]">…</dialog>

Responsive & variants#

Every class here accepts screen prefixes (xxs:5xl:) and state variants — md:hover:p-4 style stacks compile to a single media query. See responsive/index|Responsive design and variants/index|Variants.

Best practices#

  • Reserve bands: 0–10 content, 20–30 dropdowns, 40–50 headers, 100+ modals
  • Arbitrary values (z-[60]) escape the scale when governance demands it

Common mistakes#

  • Raising z-index to fight a stacking context created by transform/opacity — fix the context instead

utilities/spacing/margin|Margin · utilities/sizing/width|Width · responsive/index|Responsive