The properties learned in Section 6.1, such as margin-top and width, describe the physical directions of the screen (top/bottom/left/right). But CSS had to support vertical text and right-to-left languages (Arabic, Hebrew) from the start — logical properties replace "physical direction" with "flow direction", so the same styles work correctly in every writing mode.
The Block Axis and the Inline Axis
Logical properties no longer talk about "top/bottom/left/right", but about two abstract axes:
block axis: the direction in which text advances. In horizontal writing (such as Chinese or English set horizontally), the block axis is vertical, mapping to physical "top/bottom".
inline axis: the direction in which text runs within a line. In horizontal writing, the inline axis is horizontal, mapping to physical "left/right" (left-to-right or right-to-left depending on the language).
Logical properties use block-start / block-end / inline-start / inline-end instead of top / bottom / left / right:
.card {
margin-block-start: 16px; /* usually equivalent to margin-top */margin-inline-end: 8px; /* usually equivalent to margin-right (in LTR languages) */padding-inline: 20px; /* shorthand: inline-start + inline-end */border-inline-start: 3px solid teal;
}
Physical-to-Logical Property Reference
Physical property
Logical property (equivalent in LTR horizontal writing)
The value of logical properties is most obvious when you switch direction or writing-mode — without changing a single line of CSS, the layout adapts automatically:
DEMO · the same margin-inline-start flips direction automatically between LTR and RTL
LTR: indent on the left
RTL: indent automatically moves to the right
When to Use Them
RecommendationIf a project clearly targets only left-to-right horizontal languages (for example, a Chinese-only site), continuing with physical properties is perfectly fine and the code may even read more directly; but if the project may be internationalized, or you are writing a component library / shared styles, prefer logical properties — they save an entire set of [dir="rtl"] override rules.