Zazz Design Framework
baseUtilities

Gap & basis

Gap utilities for flex and grid containers, gap-aware flex basis fractions, and coordination variables.

gap-* controls spacing in flex and grid containers. basis-* sets flex basis fractions that automatically account for container gaps.

Gap utilities

Loading components…
ClassValue
gap-00
gap-0.5px0.5px
gap-px1px
gap-xsvar(--gap-xs)
gap-smvar(--gap-sm)
gap-mdvar(--gap-md)
gap-lgvar(--gap-lg)
gap-xlvar(--gap-xl)

Axis-specific gaps

Use gap-x-* for column-gap and gap-y-* for row-gap:

<div class="grid grid-cols-3 gap-x-lg gap-y-sm">...</div>

Flex basis fractions

Loading components…

Fraction utilities subtract gap values so child elements fit on a single line:

ClassValue
basis-0flex-basis: 0
basis-autoflex-basis: auto
basis-fullflex-basis: 100%
basis-1/2(100% - 1 * gap) / 2
basis-1/3(100% - 2 * gap) / 3
basis-1/4(100% - 3 * gap) / 4
basis-1/5(100% - 4 * gap) / 5
basis-1/6(100% - 5 * gap) / 6

Set a gap-* class on the flex container to pass the gap value into --_gap. With no gap class, --_gap defaults to 0px.

Gap coordination variables

VariableDefaultSet byConsumed by
--_gap0pxgap-*basis-1/2 to basis-1/6, auto-fill grid
--_gap-xNonegap-x-*column-gap
--_gap-yNonegap-y-*row-gap

On this page