Posts tagged “layout”
- subgrid is not flex, but people keep confusing them —
Subgrid inherits parent tracks. Flex has no equivalent — that gap pushes teams toward grid.
- column-reverse and the chat scroll-anchor pattern —
column-reverse with overflow:auto anchors a chat to the latest message without JavaScript.
- safe and unsafe alignment —
Safe and unsafe keywords control whether oversized flex items can scroll out of reach.
- auto margins in flex are a feature —
margin:auto on a flex item absorbs free space — the push-to-the-end trick.
- align-content: the property tutorials skip —
align-content does nothing on a single line. Wrap, and it owns the cross axis.
- flex-wrap and the mythical flex line —
flex-wrap turns one flex line into many independent lines stacked on the cross axis.
- justify vs align: which axis —
justify-content is main axis; align-items is cross axis. Flip direction and they swap.
- When to reach for Grid instead —
Flexbox is one-dimensional. Grid is two. Match the tool to the layout shape.