The unicode-bidi
CSS property together with the direction
property relates to the handling of bidirectional text in a document. For example, if a block of text contains both left-to-right and right-to-left text then the user-agent uses a complex Unicode algorithm to decide how to display the text. This property overrides this algorithm and allows the developer to control the text embedding.
The unicode-bidi
and direction
properties are the two only properties that are not affected by the all
shorthand.
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 |
/* 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;
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; }
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 |
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|---|
Basic support | 2.0 | (Yes) | 1.0 (1.7 or earlier) | 5.5 | 9.2 | 1.3 |
isolate | 16 -webkit [1][4] 48.0 (unprefixed) | ? |
10 (10) -moz [2] 50 (50) | No support | No support | -webkit [4] |
plaintext | 48.0 (unprefixed) | ? |
10 (10) -moz 50 (50) [5] | No support | No support | No support |
isolate-override | 48.0 (unprefixed) | ? |
17 (17) -moz 50 (50) | No support | No support | No support |
Feature | Android | Android Webview | Edge | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile | Chrome for Android |
---|---|---|---|---|---|---|---|---|
Basic support | 1.0 | (Yes) | (Yes) | 1.0 (1.0) | 6 | 8 | 3.1 | (Yes) |
isolate | ? | 48.0 | ? | 10.0 (10) -moz 50.0 (50) | No support | No support | No support | 48.0 |
plaintext | No support | 48.0 | ? | 10.0 (10) -moz [3] 50.0 (50) [5] | No support | No support | No support | 48.0 |
isolate-override | No support | 48.0 | ? | 17.0 (17) -moz 50.0 (50) | No support | No support | No support | 48.0 |
[1] Since Chrome 19, the syntax from a previous version of the spec, where the isolate
keyword could be used together with bidi-override
, is allowed.
[2] From Firefox 10 to Firefox 16 included, the old version of the spec, where the isolate
keyword could be used together with bidi-override
, was implemented. From Firefox 17, this is no longer possible: only one value is allowed and the previous isolate bidi-override
can be described using the new isolate-override
keyword.
[3] Up to Firefox 15, plaintext
didn't do anything to an inline element. The specification changed and the implementation was fixed in Firefox 15.
[4] -webkit-isolate
can lock up older versions of Safari (up to 9) and Chrome (up to 47) and is best avoided in favor of the unprefixed version.
[5] Before Firefox 50, the plaintext
value was ignored for vertical writing modes (bug 1302734).
© 2005–2017 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