Skip to main content

  • Foundations
    • Border radius
    • Breakpoints
    • Colours
    • Colour scheme
    • Elevation
    • Focus and outline
    • Sizing and spacing
    • Layout
    • Motion
    • Typography
    • Z-index
  • Elements
    • Buttons
    • Code
    • Icons
    • Figure and caption
    • Forms
    • Links
    • Lists
    • Media
    • Tables
  • Components
    • Accordion
    • Alerts
    • Avatar
    • Blockquote
    • Breadcrumbs
    • Card
    • Chiplets
    • Details and summary
    • Dialog
    • Empty state
    • Stats
    • Global footer
    • Horizontal rule
    • Kanban
    • Key-value list
    • Meter
    • Objects
    • Pagination
    • Polka background
    • Post-it note
    • Progress
    • Speech bubbles
    • Status dot
    • Skeleton
    • Skip link
    • Spinner
    • Toggles
    • Tooltip
    • Webmentions
  • Patterns
    • Article header
    • Author card
    • App list and app sheet
    • Error page
    • Related posts
    • Search results
    • Utilities

John Peart

  • Search
  • Menu
John Peart

Z-index

The named z-index scale used across the site.

Stacking order is named, not numeric-by-guess. Always reach for a token.

TokenValueUsed for
--z-base0Default flow.
--z-above1Pseudo-elements above content (radio hit-areas).
--z-raised2Hover lifts.
--z-element3Layered UI within a component.
--z-overlay100Tooltips, alerts, popovers.
--z-sticky500Sticky headers / search bars.
--z-lightbox999Full-screen media viewers.
--z-nav1000Primary navigation chrome.
--z-skiplink999999Skip-to-content link, above everything.
z-index: var(--z-overlay);
A line drawing of John Peart

John Peart

www.johnpe.art

Mastodon logo

Mastodon

BlueSky logo

Bluesky

LinkedIn logo

LinkedIn

Github logo

GitHub