CKTIS / CSS
unicode-bidi — controlling bidirectional text
unicode-bidi controls embedding, isolation, or forced text ordering in the Unicode bidirectional algorithm. It works with direction and does not change the source text.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
unicode-bidi: normal | embed | isolate | bidi-override | isolate-override | plaintext;unicode-bidi controls the scope of the Unicode bidirectional algorithm; direction usually supplies the base direction. Its initial value is normal. The property is neither inherited nor animatable.
normal creates no additional embedding. For inline boxes, embed establishes an embedding using direction, preserving characters’ inherent directionality; isolate additionally separates the ordering effects of the contents and their surroundings. Neither value affects non-inline boxes.
bidi-override forces immediate inline content into the order specified by direction, ignoring its inherent directionality. isolate-override combines overriding with isolation. plaintext behaves like isolation but determines the base direction of each bidi paragraph or isolated sequence using Unicode rules P2/P3 rather than direction. It leaves the computed value of direction unchanged, but the bidi paragraph direction it determines can affect line alignment, including which edge text-align: start aligns to.
In HTML, prefer the semantic dir attribute and appropriate elements such as bdo instead of CSS: directionality should survive missing stylesheets. The example deliberately demonstrates the CSS mechanism, not the recommended content-markup pattern.
Examples
<!doctype html>
<meta charset="utf-8">
<title>unicode-bidi</title>
<style>
p { direction: ltr; }
span { direction: rtl; unicode-bidi: isolate-override; }
</style>
<p>START <span>ABC</span> END</p>Result
START CBA END
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.