liveBook · Manning

Inline axis

As explained in Web Design Playground, Second Edition

The inline axis is the CSS layout axis parallel to the direction of text in the current writing mode.

The inline axis runs in the direction that words flow in the current writing mode. In English and Arabic, that means horizontally. In CSS Grid, it is also the row axis—the direction content travels across a grid row. section 13.9

The block axis sits perpendicular to it and is also called the column axis. Once you know which way the inline axis points, grid alignment stops feeling like spatial guesswork. section 13.9

Aligning along the inline axis

To position grid items across their rows, use justify-content on the grid container. Values such as start, end, center, stretch, space-between, space-around, and space-evenly control the arrangement. section 13.9

container {
    display: grid;
    justify-content: start|end|center|stretch|space-between|space-around|space-evenly;
}

Try each justify-content value to see how grid rows distribute their items along the inline axis. section 13.9

How Web Design Playground, Second Edition covers it

How deep it goes
Defines the axis, contrasts it with the block axis, and demonstrates container-level alignment without exploring writing-mode variations.
Examples
Uses English and Arabic writing directions plus justify-content values including center, stretch, and space-evenly.
What it assumes
Assumes CSS Grid containers while defining writing mode and the two grid axes in plain language.
What you can do after
Apply it via justify-content to arrange grid items along the row axis.
How it connects
Connects writing mode, CSS Grid Layout, block axis, row axis, column axis, and justify-content.

Related concepts

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