Definition and Usage
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.
Note: This property is intended for DTD designers. Web designers and similar authors should not override it.
- Initial normal
- Applies to all elements, though some values have no effect on non-inline elements
- Inherited no
- Media visual
- Computed Value as specified
- Animatable no
- Canonical order the unique non-ambiguous order defined by the formal grammar
Syntax
Formal syntax: normal | embed | isolate | bidi-override | isolate-override | plaintext
unicode-bidi: normal unicode-bidi: embed unicode-bidi: isolate unicode-bidi: bidi-override unicode-bidi: isolate-override unicode-bidi: plaintext unicode-bidi: inherit
Values
- normal
- The element does not offer a additional level of embedding with respect to the bidirectional algorithm. For inline elements implicit reordering works across element boundaries.
- embed
- If the element is inline, this value opens an additional level of embedding with respect to the bidirectional algorithm. The direction of this embedding level is given by the direction property.
- bidi-override
- For inline elements this creates an override. For block container elements this creates an override for inline-level descendants not within another block container element. This means that inside the element, reordering is strictly in sequence according to the direction property; the implicit part of the bidirectional algorithm is ignored.
- isolate
- This keyword indicates that the element's container directionality should be calculated without considering the content of this element. The element is therefore isolated from its siblings. When applying its bidirectional-resolution algorithm, its container element treats it as one or several U+FFFC Object Replacement Character, i.e. like an image.
- isolate-override
- This keyword applies the isolation behavior of the isolate keyword to the surrounding content and the override behavior of the bidi-override keyword to the inner content.
- plaintext
-
This keyword makes the elements directionality calculated without considering its parent bidirectional state or the value of the direction property. The directionality is calculated using the P2 and P3 rules of the Unicode Bidirectional Algorithm.
This value allows to display data which has already formatted using a tool following the Unicode Bidirectional Algorithm.
Examples
.bible-quote { direction: rtl; unicode-bidi: embed; }
Compatibility
Desktop browsers
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | 2.0 | 1.0 (1.7 or earlier) | 5.5 | 9.2 | 1.3 |
isolate | 16 -webkit | 10.0 (10) -moz | Not supported | Not supported | Not supported |
plaintext | Not supported | 10.0 (10) -moz | Not supported | Not supported | Not supported |
isolate-override | Not supported | 17.0 (17) -moz | Not supported | Not supported | Not supported |
Mobile browsers
Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | 1.0 | 1.0 (1.0) | 6 | 8 | 3.1 |
isolate | NA | 10.0 (10) -moz | Not supported | Not supported | Not supported |
plaintext | Not supported | 10.0 (10) -moz | Not supported | Not supported | Not supported |
isolate-override | Not supported | 17.0 (17) -moz | Not supported | Not supported | Not supported |