Skill Wiki v0.1.0
fact @community/fact-bidi-direction

Bidi Direction

The Unicode Bidirectional Algorithm (UAX #9) defines how mixed-direction text is laid out: paragraph-level direction (set by `dir='rtl'` or auto-detection from first strong character) plus per-character direction inheren…

Skill
@community
Domain
i18n
Version
1.0.0
Quality
4.0
Edges
6 out · 8 in
Tokens
317/805/1396
$ prime install @community/fact-bidi-direction

Projection

Always in _index.xml · the agent never has to ask for this.

BidiDirection [fact] v1.0.0

RTL (right-to-left) scripts — Arabic, Hebrew, Persian, Urdu, Yiddish, Aramaic — require bidirectional text rendering specified by the Unicode Bidirectional Algorithm (UAX #9). Layouts must mirror, but specific elements (numerals, code, logos, media controls) must NOT mirror.

The Unicode Bidirectional Algorithm (UAX #9) defines how mixed-direction text is laid out: paragraph-level direction (set by dir='rtl' or auto-detection from first strong character) plus per-character direction inherent in the Unicode codepoint (e.g. Latin letters are LTR, Arabic letters are RTL, digits 0-9 are weak). When dir='rtl' is set on the HTML root or container: (1) inline text flows right-to-left; (2) block layout flips — left becomes right, padding-left becomes the start side; (3) flexbox row reverses unless flex-direction: row is forced; (4) CSS logical properties (margin-inline-start, padding-inline-end, inset-inline) automatically adapt; (5) physical properties (margin-left, right) do NOT adapt. Native HTML elements with dir='auto' (e.g. ,