Foundation 6’s XY grid is a flexbox layout system. A page band typically nests grid-container → grid-x → one or more cell elements. Width, growth, and shrink behavior are controlled with classes—not inline widths.
Core building blocks
grid-container— centered max-width wrapper with horizontal paddinggrid-x— horizontal flex row (the “X” axis)cell— column child; addsmall-12,medium-6, etc. for track spansgrid-margin-x/grid-padding-x— gutter between cells
Concepts from CSS flexbox apply directly. Compare Bootstrap’s row/col grid: both divide space into twelfths, but Foundation names the row grid-x and puts breakpoint prefixes on the cell.
Important interview questions and answers
- Q: Why is it called XY grid?
A: Rows flow on the X axis (grid-x); vertical stacks usegrid-yon the Y axis—one-dimensional flex tracks per direction. - Q: Flexbox or CSS Grid in Foundation 6?
A: The primary layout system is flex-based XY cells; use native CSS Grid separately when you need explicit two-dimensional template areas.
Self-check
- What three classes form the smallest valid XY layout?
- What does
grid-margin-xadd between siblings?