Logical properties
Logical properties describe layout according to the writing direction rather than left or right. Your design adapts on its own to languages such as Arabic or Japanese.
- inline: the axis text flows along. In English it is horizontal.
- block: the axis blocks stack along. In English it is vertical.
- margin-inline, padding-block: replace the physical margins and paddings of each axis.
- inline-size, block-size: equivalent to width and height in horizontal writing.
- inset-inline-start: the logical equivalent of left in left-to-right languages.
Example
Change direction and writing-mode. Because the item class uses logical properties, its spacing follows the writing direction in every case.
ResultLive
html
css