liveBook · Manning

Nowrap

As explained in Web Design Playground

A flex-wrap value that keeps flex items on a single line.

nowrap keeps a flex container’s items on one line instead of moving them into additional rows or columns. It is the default flex-wrap value, so declaring it is optional. section 12.2

Picture a row of toys on a shelf:

  • With row or row-reverse, items stay in one row; with column or column-reverse, they stay in one column. section 12.2
  • When the items do not fit, flexbox shrinks them along the main axis rather than wrapping them. section 12.2
  • Use wrap instead when items should continue on multiple rows or columns. section 12.2
container {
    display: flex;
    flex-wrap: nowrap|wrap|wrap-reverse;
}

Try flex-wrap: nowrap alongside wrap and wrap-reverse to compare how the same flex container arranges its items. section 12.2

How Web Design Playground covers it

How deep it goes
Defines the default behavior and contrasts shrinking with wrapping, but does not detail sizing algorithms or overflow handling.
Examples
Uses row and column layouts, a comparison of flex-wrap values, and an interactive Playground exercise.
What it assumes
Builds on flex containers and flex-direction while explaining the single-line default directly.
What you can do after
Apply it via CSS to keep a flex container’s items on one line.
How it connects
Connects flex-wrap with flexbox, flex-direction, the main axis, and the cross axis.

This explainer was generated by Manning's knowledge graph from the text of Web Design Playground. The section links point to the parts of the book it draws on.