How Browsers Convert CSS Logical Properties into Physical Styles
Developers often find that CSS logical properties like margin-inline-start do not always behave as expected when text direction changes. Traditional physical properties such as margin-left stay fixed to the box edges, while logical properties are defined relative to the writing mode and text flow. Browsers translate logical properties into physical ones during style computation, mapping inline-start to left in LTR horizontal text and to right in RTL. In vertical writing modes, the inline and block axes swap, so logical properties can map to top or bottom edges instead. The layout engine ultimately only works with physical properties, which explains many unexpected layout results.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in