Sub topic 8
Modular grids
This chapter assumes you know basic typography terms (point size, leading, line length), have used a layout tool such as InDesign, Affinity Publisher or Figma, and can read simple CSS. It builds on column grids and grid math from earlier chapters.
What a modular grid is
A modular grid divides the page into columns and rows. The crossings form equal rectangles called modules. A multi-column grid controls only horizontal placement. A modular grid also controls vertical placement, so images, captions and text blocks can snap to both axes.
Modular grids suit content with many mixed elements: newspapers, magazines, catalogs, dashboards and timetables. They are less useful for long continuous text, where a plain column grid is simpler.
Building the rows
Rows should relate to your baseline grid. If body text has 12 pt leading, make each module height a whole number of lines, plus the gutter between modules. Otherwise text in neighbouring modules drifts off the baseline.
The rule: the module height plus one gutter should be a multiple of the leading. Here is a small function that finds module height for a chosen number of text lines.
def module_height(lines, leading, gutter):
"""Height of a module that holds a whole number of text lines.
The gutter must be a whole multiple of the leading so that
the next module's first line lands on the baseline grid.
"""
if gutter % leading != 0:
raise ValueError("gutter should be a multiple of the leading")
return lines * leading + (lines - 1) * 0 # text lines only
# 12 pt leading, 12 pt gutter, modules holding 8 lines
h = module_height(8, 12, 12)
print(h) # 96
print((h + 12) % 12) # 0, so the next module starts on a baselineBecause the height plus gutter (108) is divisible by 12, every module begins on a baseline.
A worked example
Take a page with four columns and six rows. In CSS, fixed row heights and equal columns produce modules.
.modular {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-rows: repeat(6, 8rem);
gap: 1rem;
}
.feature { grid-column: 1 / span 2; grid-row: 1 / span 3; }
.caption { grid-column: 3 / span 2; grid-row: 1; }The feature image fills a block of two columns by three rows. The caption sits beside it in a single module row. Everything else falls into the remaining modules.
Choosing the module count
More modules give more flexibility but weaken the structure. Too many, and the layout looks arbitrary. Start with a number that divides cleanly into the sizes you need.
| Grid | Modules | Good for |
|---|---|---|
| 3 x 3 | 9 | Simple pages, posters |
| 4 x 6 | 24 | Magazines, product catalogs |
| 6 x 8 | 48 | Newspapers, dense data pages |
Numbers with many factors (6, 8, 12) allow more ways to split the grid into halves, thirds and quarters.
Common errors
- Module heights that ignore leading, so text baselines misalign between modules.
- Rows set in
frunits in CSS, which stretch with content and no longer stay equal. Use fixed heights, or accept that the grid is only column-based. - Treating every module as a required container. Elements may span several modules, and some modules may stay empty on purpose. White space is part of the design.
- Gutters that differ horizontally and vertically without a reason. Equal gutters keep modules visually consistent.
Exercise
A page has 14 pt leading and a 14 pt gutter. You want each module to hold 6 lines of text. What is the module height, and does the next module start on a baseline?
Show answer
The height is 6 x 14 = 84 pt. Adding the 14 pt gutter gives 98 pt, which is 7 x 14, so the next module starts on a baseline.