Subgrid: Card Grids Where Everything Finally Lines Up
Titles, prices and buttons at different heights across cards - the misalignment that made designers invent equal-height hacks - is what subgrid was built to end.
Step-by-step programming tutorials on PHP, JavaScript, Laravel, WordPress and more.
Titles, prices and buttons at different heights across cards - the misalignment that made designers invent equal-height hacks - is what subgrid was built to end.
Slanted section dividers, circular image crops, magazine-style text wrap around a portrait - two properties cover the layout tricks everyone assumes need images.
margin-left breaks the moment your site meets Arabic or Hebrew. Logical properties describe direction-relative intent - and they are more ergonomic even if you never localize.
padding-top: 56.25% wrapped in a positioned div was how we faked 16:9 boxes for fifteen years. One property replaces the whole contraption - and prevents layout shift while it's at it.
Window resize listeners cannot see a sidebar collapsing or a panel being dragged wider. ResizeObserver watches the element itself - the JS half of container-based design.
The lobotomized owl, :not(:last-child) margins, negative-margin wrappers - all workarounds for spacing between flex items. gap has worked in flexbox everywhere since 2021.
Sticky elements that refuse to stick are almost always trapped by an ancestor with overflow set, or a parent that is exactly as tall as they are. Here is the debugging checklist.