Zazz Design Framework
baseUtilities

Responsive design

Container style query prefixes (@xs: to @xl:) and supported utility families.

Responsive utilities use container style queries with @ prefixes: @xs:, @sm:, @md:, @lg:, @xl:.

Loading components…

Prefixes

Each prefix applies min-width style rules at or above the threshold:

PrefixThresholdToken
(none)Base viewNone
@xs:40rem--breakpoint-xs
@sm:48rem--breakpoint-sm
@md:64rem--breakpoint-md
@lg:80rem--breakpoint-lg
@xl:96rem--breakpoint-xl
<div class="grid grid-cols-1 @xs:grid-cols-2 @sm:grid-cols-3 @lg:grid-cols-4 gap-md">...</div>

How breakpoints work

  1. _variables.css defines --breakpoint-* length tokens.
  2. The body element acts as a container (container-name: body). Container size queries set boolean flags (--is-breakpoint-md: true) when width thresholds are reached.
  3. Responsive classes evaluate @container style(--is-breakpoint-md: true).

Supported responsive families

  • Container: container (and data-variant="article")
  • Display: hidden, block, flex, inline-flex, grid
  • Subgrid: grid-cols-subgrid, grid-rows-subgrid
  • Grid tracks: grid-cols-1...12, grid-rows-1...12
  • Grid spans: col-span-1...12, row-span-1...12
  • Flex direction: flex-row, flex-col
  • Flex basis: basis-0, basis-auto, basis-full, basis-1/2...1/6
  • Align items: items-start, items-center, items-end, items-stretch
  • Justify content: justify-start, justify-center, justify-end, justify-stretch, justify-around, justify-between
  • Text align: text-left, text-center, text-right, text-justify

Base-only families

To keep CSS size compact, the following families do not generate responsive prefixes:

  • Self alignment (self-*, justify-self-*, place-items-*)
  • Spacing (p-*, m-*, gap-*), sizing (w-*, h-*, size-*), and negative margins
  • Color, borders, radius, shadow, opacity, and scale

Change layout structure at breakpoints (e.g. @md:flex-row) to adapt spacing instead of using per-breakpoint spacing classes.

Loading components…

On this page