from2ality
6 days agoCSS wish: inner breakpoints
One important recent next step were container queries: .parent { container-name: parent; container-type: inline-size; } article { flex-direction: row; } @container parent (width < 40rem) { article { flex-direction: column; } } Instead of reacting to viewport size changes, we can react to size changes of HTML elements. With media queries, the whole page was responsive. With container queries, individual user interface elements can be responsive, too.
Web development