Map inline and block edges to the directions that text and successive lines follow.
The space before the first word of a paragraph can be on the left, the right, or the top. CSS can name that edge in relation to the text, so a spacing rule can follow the language and layout.
The inline axis runs along a line of text. The block axis runs in the direction that successive lines stack. In an English paragraph with horizontal, left-to-right text, the first word begins at the left and each new line sits below the previous one.
Read a horizontal, right-to-left paragraph and the first word begins at the right. The next line still sits below. With the writing mode vertical-rl and left-to-right direction, a line reads down the page and the next line starts to its left. In that case the first line is at the right edge.
padding-inline-start introduces space at the start of a line of text. In those three paragraphs, the added space appears on the left, right, and top respectively. A physical property such as padding-left always selects the left edge.
The same distinction applies to size. inline-size measures along a line, so it corresponds to width in horizontal writing and height in vertical writing. A limit on a paragraph’s inline size can keep its lines readable in either orientation.
Try it yourself
HTML + CSS