CSS Cheatsheets
Learn CSS by clicking, not reading. Every property has a live interactive demo and copy-paste code in both CSS and Tailwind.
Flexbox Cheatsheet
flex-direction, justify-content, align-items, flex-wrap, gap, flex-grow, order, and align-self, each with a live demo you can click.
Open cheatsheet →CSS Grid Cheatsheet
grid-template-columns, auto-fit, gap, place-items, spanning, template areas, and auto-rows, each with a live demo you can click.
Open cheatsheet →CSS Animation Cheatsheet
The animation shorthand, a live easing curve visualizer, direction, fill-mode, iteration count, and delay, each with a live demo.
Open cheatsheet →Box Shadow Cheatsheet
An interactive shadow builder with sliders, the box-shadow syntax order, layered shadow presets, Tailwind shadow utilities, and common recipes.
Open cheatsheet →Border Radius Cheatsheet
An interactive corner builder, the shorthand and elliptical slash syntax, Tailwind rounded utilities, and recipes for pills, avatars, and cards.
Open cheatsheet →CSS Transitions Cheatsheet
An interactive transition builder, the shorthand order, timing function presets you can feel, and recipes for hover lift, color fade, and zoom.
Open cheatsheet →CSS Gradients Cheatsheet
An interactive gradient builder, linear radial and conic syntax, Tailwind gradient utilities, and recipes for backgrounds, text, and overlays.
Open cheatsheet →CSS Transforms Cheatsheet
An interactive transform builder with sliders, a side-by-side demo of why function order matters, Tailwind rotate scale and translate utilities, and common recipes.
Open cheatsheet →CSS Position Cheatsheet
An interactive position playground, a containing block visualizer, a sticky scroll demo, Tailwind position utilities, and recipes for modals, badges, and navbars.
Open cheatsheet →CSS Filters Cheatsheet
An interactive filter playground with sliders, every filter function with its value range, chaining rules, backdrop-filter glass demos, Tailwind filter utilities, and common recipes.
Open cheatsheet →CSS Nesting Cheatsheet
A live nested vs flat CSS comparison, the parent selector, nesting media queries, nesting vs Sass, browser support, and copy-paste nesting examples.
Open cheatsheet →CSS Blend Modes Cheatsheet
A live mix-blend-mode playground, mix vs background blending, all 16 blend modes grouped and explained, isolation, and copy-paste blend recipes.
Open cheatsheet →Flexbox or Grid: the One-Question Rule
Flexbox lays out in one dimension; Grid lays out in two. The decision rule is a single question: do you need to control rows and columns at the same time? A photo gallery where cards must align both horizontally and vertically needs Grid, because only Grid manages the two axes together. A navigation bar, a toolbar, or a stack of form fields flows in one direction, which is Flexbox territory: content distributes along a single axis and wraps only as a fallback. In practice, Grid suits page-level scaffolding and repeating card layouts, while Flexbox suits component internals: centering content inside a card, spacing items in a header, aligning an icon with a label. Either can approximate the other, but the code tells you when you picked wrong. Nested flex containers with fixed widths to fake columns means you wanted Grid, and a grid with a single column that never spans means you wanted Flexbox.
`display: grid-lanes`: an Honest Status Report
display: grid-lanes is an emerging CSS proposal for masonry-style layouts: items placed into vertical lanes, filling the shortest available lane first, like a photo feed where cards of different heights pack tightly without fixed rows. The problem it aims to solve is real. Masonry today requires either CSS multi-column layout, which orders content down each column instead of across rows, or a JavaScript library that measures every item and positions it manually, with all the resize and reflow costs that implies. A native lane layout would remove that machinery. The honest status is that it remains a proposal, not a shipped feature. Browser support is experimental at best and absent in stable releases, so it cannot be used in production today. Track its progress through specification drafts and compatibility tables, and build masonry in the meantime with multi-column layout plus break-inside-avoid, or with a script when ordering across rows matters.
Transitions or Keyframes: State Changes versus Sequences
Transitions animate between two states; keyframe animations choreograph sequences. The decision rule is direct: if the motion responds to a state change, a hover, a toggle, an opening panel, use a transition. The browser handles interruption and reversal automatically. Releasing a hover mid-fade reverses smoothly from the current value, which is exactly the behavior users expect. If the motion has multiple phases, loops indefinitely, or runs on its own timing independent of state, a loading spinner, a staggered entrance, a pulsing indicator, use keyframes. Keyframes cannot reverse themselves; the reverse direction needs its own definition or its own animation. Performance guidance is identical for both: animate transform and opacity, which the browser composites without recalculating layout, and keep layout-triggering properties like width, height, margin, and top out of the animated set. A transition on transform is cheap. A keyframe animation on width is expensive, and no easing curve fixes that.