Flexbox
css-flexbox
Code Snippets
Center Anything with Flexbox
Centering a child horizontally and vertically used to require pixel math, table tricks, or absolute-positioning hacks. Flexbox collapses the whole thing into three properties. This snippet covers the canonical centering pattern, the inline-flex variant for centering inside button-shaped wrappers, and the gap-aware multi-child version that keeps spacing consistent.
Sticky Footer with Flexbox
A footer that stays at the bottom of the viewport on short pages and at the bottom of the content on long pages used to require absolute positioning, fixed heights, or table-cell tricks. Flexbox solves it with two declarations. This snippet covers the canonical body-flex layout, the grid-based equivalent, and the wrapper variant for apps that already have a top-level container.
Question Banks
Community
The Frontend-Only Loop I Coach People Through
Five rounds I rehearse with frontend candidates: a DOM puzzle, a CSS layout, a state management drill, an accessibility audit, and a rendering performance question. JavaScript throughout, framework-agnostic where possible.
Frontend Engineer Loop at a Design-Centric Company
A 5 round frontend loop at a design-centric Series C SaaS. The CSS round, the rendering round, the design-system round, and what each one was actually grading.
Flexbox vs Grid: Pick the Right Tool
Flexbox is one-dimensional layout, Grid is two-dimensional. Most layout battles end faster when you pick the right one before you start writing CSS.
