Class Reference
Spacing
Class Reference
Spacing
Padding and gaps between elements.
How to use
Apply gap classes to flex or grid parents and padding classes to the element itself. padding-none resets all four sides, so do not combine it with a class that should keep padding. For sections, use padding-top-* or padding-bottom-* to change one side. Both families support none, sm, md, lg, xl, 2xl and 3xl. For example, section-md padding-bottom-sm keeps normal top padding and uses small bottom padding. The same modifiers work on section-tight. You can combine one top modifier with one bottom modifier; use only one per side.
Responsive behavior
Many values reference fluid spacing variables and scale automatically. Use a responsive class when that class has a tablet or mobile variant.
Visual reference
Examples use your current design variables. Named gaps use colored blocks to show their intended layouts; internal placeholder details use a fixed 8px gap. Generic gap demos use matching grids for comparison. Auto-margin demos leave room for movement, and reset demos compare against a 24px starting value.
The gap separates full-width section placeholders.
The class controls both row and column gaps.
The class controls both row and column gaps.
The class controls both row and column gaps.
The class controls both row and column gaps.
The class controls both row and column gaps.
The class controls both row and column gaps.
The class controls both row and column gaps.
The class controls both row and column gaps.
The class controls both row and column gaps.
The class controls both row and column gaps.
The gap separates the image, heading, text group and action inside a card.
The gap separates a heading, text group and action in a content stack.
The gap separates card placeholders across both rows and columns.
The gap separates the logo, navigation group and action placeholder.
The gap separates the brand area and each link column.
The gap separates individual navigation placeholders.
The gap separates field groups and the submit-action placeholder.
The gap separates a media area from its content column. The same gap remains when they stack.
Auto margin on both sides centers the block.
Auto margin on the left pushes the block right.
Auto margin on the right pushes the block left.
Auto margin above pushes the block to the bottom.
The starting box has 24px margin on every side. The modifier resets only the indicated sides.
The starting box has 24px padding on every side. The modifier resets only the indicated sides.
The starting box has 24px margin on every side. The modifier resets only the indicated sides.
The starting box has 24px margin on every side. The modifier resets only the indicated sides.
The starting box has 24px padding on every side. The modifier resets only the indicated sides.
The starting box has 24px padding on every side. The modifier resets only the indicated sides.
The starting box has 24px padding on every side. The modifier resets only the indicated sides.
The starting box has 24px padding on every side. The modifier resets only the indicated sides.
Auto margin below keeps the block at the top.
Only row spacing changes; column spacing stays at 16px.
Only row spacing changes; column spacing stays at 16px.
Only row spacing changes; column spacing stays at 16px.
Only row spacing changes; column spacing stays at 16px.
Only row spacing changes; column spacing stays at 16px.
Only row spacing changes; column spacing stays at 16px.
Only row spacing changes; column spacing stays at 16px.
Only row spacing changes; column spacing stays at 16px.
Only row spacing changes; column spacing stays at 16px.
Only row spacing changes; column spacing stays at 16px.
Only column spacing changes; row spacing stays at 16px.
Only column spacing changes; row spacing stays at 16px.
Only column spacing changes; row spacing stays at 16px.
Only column spacing changes; row spacing stays at 16px.
Only column spacing changes; row spacing stays at 16px.
Only column spacing changes; row spacing stays at 16px.
Only column spacing changes; row spacing stays at 16px.
Only column spacing changes; row spacing stays at 16px.
Only column spacing changes; row spacing stays at 16px.
Only column spacing changes; row spacing stays at 16px.