ToolSnippet
📐Developer Cheat Sheet

CSS Flexbox, Grid & Modern Layout Properties Reference

Visual quick reference for CSS Flexbox container/child alignment properties, CSS Grid layout patterns, and modern responsive functions (clamp, min, max).

1-Click Syntax CopyProduction-Tested StandardsInteractive Tool Companion

Need to generate CSS effects visually?

Build modern glassmorphism blurs, multi-layered box shadows, and gradients.

Launch CSS Glassmorphism Generator

Flexbox Container Properties

Properties applied to the parent flex container.

Syntax / TokenName / TypeDescriptionExample / Notes
display: flex;
Flex ContainerDefines a flex container and activates flex context for direct children
flex-direction: row | column | row-reverse | column-reverse;
DirectionSets the main axis direction
justify-content: flex-start | center | flex-end | space-between | space-around | space-evenly;
Main Axis AlignmentAligns flex items along the main axis
align-items: stretch | flex-start | center | flex-end | baseline;
Cross Axis AlignmentAligns flex items along the cross axis
flex-wrap: nowrap | wrap | wrap-reverse;
Multi-line WrappingControls whether flex items wrap into multiple lines
gap: 1rem 1.5rem;
Row / Column GapSets gutter spacing between flex and grid items

CSS Grid Layout Properties

Properties for 2-dimensional grid layouts.

Syntax / TokenName / TypeDescriptionExample / Notes
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
Responsive Auto GridCreates auto-wrapping responsive columns without media queries
grid-template-columns: 1fr 2fr 1fr;
Fractional Columns (fr)Splits available grid space by proportional fractional units
grid-column: span 2;
Column SpanItem spans across 2 column tracks

Modern CSS Math Functions

Fluid typography and responsive size calculations.

Syntax / TokenName / TypeDescriptionExample / Notes
font-size: clamp(1rem, 2.5vw, 2.5rem);
Fluid Clampclamp(min, preferred, max) — keeps value bounded between min and max
width: min(100%, 1200px);
Minimum BoundSets width to 100% on small screens, capping at 1200px on large viewports
aspect-ratio: 16 / 9;
Aspect RatioEnforces video or card aspect ratio without padding hacks

Frequently Asked Questions

Common questions and developer tips regarding css flexbox & grid property reference.

Explore More Cheat Sheets

All Cheat Sheets →