The unicode-bidi
CSS property, together with the direction
property, determines how bidirectional text in a document is handled. For example, if a block of content contains both left-to-right and right-to-left text, the user-agent uses a complex Unicode algorithm to decide how to display the text. The unicode-bidi
property overrides this algorithm and allows the developer to control the text embedding.
The unicode-bidi
and direction
properties are the only properties that are not affected by the all
shorthand.
Note: This property is intended for Document Type Definition (DTD) designers. Web designers and similar authors should not override it.
/* Keyword values */ unicode-bidi: normal; unicode-bidi: embed; unicode-bidi: isolate; unicode-bidi: bidi-override; unicode-bidi: isolate-override; unicode-bidi: plaintext; /* Global values */ unicode-bidi: inherit; unicode-bidi: initial; unicode-bidi: unset;
Initial value | normal |
---|---|
Applies to | all elements, though some values have no effect on non-inline elements |
Inherited | no |
Media | visual |
Computed value | as specified |
Animation type | discrete |
Canonical order | the unique non-ambiguous order defined by the formal grammar |
normal
embed
direction
property.bidi-override
direction
property; the implicit part of the bidirectional algorithm is ignored.isolate
U+FFFC Object Replacement Character
, i.e. like an image.isolate-override
isolate
keyword to the surrounding content and the override behavior of the bidi-override
keyword to the inner content.plaintext
direction
property. The directionality is calculated using the P2 and P3 rules of the Unicode Bidirectional Algorithm.normal | embed | isolate | bidi-override | isolate-override | plaintext
.bible-quote { direction: rtl; unicode-bidi: embed; }
<div class="bible-quote"> A line of text </div> <div> Another line of text </div>
Specification | Status | Comment |
---|---|---|
CSS Writing Modes Module Level 3 The definition of 'unicode-bidi' in that specification. | Candidate Recommendation | Added plaintext , isolate , and isolate-override keywords. |
CSS Level 2 (Revision 1) The definition of 'unicode-bidi' in that specification. | Recommendation | Initial definition. |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | 2 | 12 | 1 | 5.5 | 9.2 | 1.3 |
isolate |
48
|
No | 50
|
No | No | Yes
|
plaintext |
48 | No | 50
|
No | No | No |
isolate-override |
48 | No | 50
|
No | No | No |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | 1 | Yes | Yes | 4 | 8 | 3.1 | Yes |
isolate |
48 | 48 | No | 50
|
No | No | 5.0 |
plaintext |
48 | 48 | No | 50
|
No | No | 5.0 |
isolate-override |
48 | 48 | No | 50
|
No | No | 5.0 |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/unicode-bidi