Responsive flex layouts adapt direction, wrapping, and spacing at content-based breakpoints.
Common responsive pattern
.toolbar { display:flex; flex-direction:column; gap:.5rem; }\n@media (min-width: 768px) {\n .toolbar { flex-direction: row; align-items: center; }\n}
Important interview questions and answers
- Q: Mobile-first flex strategy?
A: Start column/stacked for narrow screens, then switch to row when space allows. - Q: Why not only rely on nowrap rows?
A: Long content can overflow and break layouts on small devices. - Q: What should be tested besides width?
A: Zoom, localization text length, and keyboard focus flow.
Tip: Set display:flex on the parent; align/justify control children along axes.