Layout Direction

Components

Direction

Bidirectional text support: the same components flipped for RTL locales.

LTR / RTL

dir="ltr"

dir="rtl"

Components use logical margins and padding — ms-*, me-*, ps-*, text-start — so setting dir="rtl" flips the layout for free. No RTL stylesheet.

Mixed content

The Cairo release notes open with التصميم حيث تلتقي الكتابة والبرمجة — “design where writing meets code” — and the bidi algorithm keeps the dashes and quotes exactly where English prose expects them.

Wrap embedded opposite-direction runs in <bdi> (or dir="auto") so surrounding punctuation never reorders.

Markdown for agents: /design/direction.md · spec: /design.md