Skip to content
Guest
← All References
CSS Baseline Widely Available

Modern CSS Property Reference

Scannable quick reference of essential modern CSS properties, functions, selectors, and at-rules.

display: grid | flex; clamp(); :has(); @container; @layer;

Box Model & Sizing

Property / FunctionPurposeExample
box-sizingInclude padding/border in widthbox-sizing: border-box;
margin-inline / padding-blockFlow-relative logical spacingmargin-inline: auto;
clamp(min, pref, max)Fluid responsive sizingfont-size: clamp(1rem, 3vw, 2rem);
aspect-ratioLock width-to-height proportionaspect-ratio: 16 / 9;
overflowControl overflowing contentoverflow: clip; / overflow: auto;

Layout (Flexbox, Grid & Positioning)

PropertyPurposeExample
displayActivate Flexbox or CSS Griddisplay: flex; / display: grid;
gapSpace between flex/grid itemsgap: 1rem;
grid-template-columnsDefine columns or auto-fit cardsrepeat(auto-fit, minmax(14rem, 1fr))
grid-template-rows: subgridInherit parent grid row tracksgrid-row: span 3; grid-template-rows: subgrid;
positionAnchor or pin elementsposition: sticky; top: 0;
scroll-snap-typeTouch-friendly snapping carouselsscroll-snap-type: x mandatory;

Modern Selectors & At-Rules

SyntaxPurpose
:has(selector)Style a parent based on its children or checked inputs
:is(a, b) / :where(a, b)Group selectors (with :where() at zero specificity)
:focus-visibleShow focus rings for keyboard navigation only
@container (min-width: ...)Adapt a component to its parent container’s width
@layer base, components, utilities;Control cascade order without specificity wars

Color, Typography & Motion

Property / FunctionPurposeExample
--custom-prop / var()Design-system variablescolor: var(--accent, #2563eb);
color-mix()Dynamic tints & shadescolor-mix(in srgb, var(--brand) 15%, white)
text-wrap: balancePrevent orphan words in headingsh1 { text-wrap: balance; }
backdrop-filterFrosted glass blur behind surfacesbackdrop-filter: blur(10px);
transition / transformGPU-friendly 60fps micro-interactionstransition: transform 200ms ease;
@keyframes + prefers-reduced-motionAccessible multi-step animations@media (prefers-reduced-motion: reduce)

Search courses, lessons, and references

Type to search across all courses, lessons, and quick references.

Press Esc to close Powered by Pagefind