unicode-bidi
Summary
The unicode-bidi CSS property specifies the level of embedding with respect to the bidirectional algorithm.
Overview table
- Initial value
normal
- Applies to
- All elements
- Inherited
- No
- Media
- visual
- Computed value
- specified value
- Animatable
- No
- CSS Object Model Property
unicodeBidi
Syntax
unicode-bidi: bidi-override
unicode-bidi: embed
unicode-bidi: normal
Values
- normal
- Default. Element does not open an additional level of embedding. For inline elements, implicit reordering works across element boundaries.
- embed
- Element opens an additional level of embedding. The value of the direction property specifies the embedding level. Reordering is implicit inside the element.
- bidi-override
- Same as the
embed
value, except that, inside the element, reordering is strictly in sequence according to the direction property. This value overrides the implicit bidirectional algorithm.
Examples
A simple example showing multiple <p>s, that they have different unicode-bidi properties applied to them.
<p class="rtl">This is a paragraph using right-to-left direction.</p>
<p class="rtl" id="em">Sets the embed as the value unicode-bidi property.</p>
<p class="rtl" id="bidi">Sets the bidi-override as the value of unicode-bidi property.</p>
p {
width: 300px;
background-color: #cccccc;
}
.rtl {
direction: rtl;
}
#em {
unicode-bidi: embed;
}
#bidi {
unicode-bidi: bidi-override;
}
Notes
The unicode-bidi
property is used with the direction property. The Unicode bidirectional algorithm automatically reverses embedded character sequences according to their inherent direction. For example, the base direction of an English document is left-to-right. If portions of a paragraph within the document contain a language with a right-to-left reading order, the direction of that language displays correctly right-to-left. The user agent applying the bidirectional algorithm correctly reverses the language direction.
Related specifications
- Cascading Style Sheets Level 2 Revision 1
- W3C Recommendation
See also
Other articles
- CSSStyleDeclarationCSSStyleDeclaration
- currentStylecurrentStyle
- runtimeStyleruntimeStyle
- stylestyle
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]