CSS unicode-bidi
The CSS unicode-bidi
property is used in conjunction with the direction
property to specify which direction the text should run (i.e. from left to right or right to left).
Syntax
Possible Values
normal
- The element does not open an additional level of embedding with respect to the bidirectional algorithm. For inline elements, implicit reordering works across element boundaries.
embed
- If the box is inline, this value creates a directional embedding by opening an additional level of embedding with respect to the bidirectional algorithm. The direction of this embedding level is given by the
direction
property. Inside the element, reordering is done implicitly. isolate
-
On an inline box, this bidi-isolates its contents. The element's container directionality is calculated without considering the content of this element.
bidi-override
- This value puts the box's immediate inline content in a directional override. For an inline, this means that the box acts like a directional embedding in the bidirectional algorithm, except that reordering within it is strictly in sequence according to the
direction
property; the implicit part of the bidirectional algorithm is ignored. For a block container, the override is applied to an anonymous inline box that surrounds all of its content. isolate-override
- This combines the isolation behavior of
isolate
with the directional override behavior ofbidi-override
. So to surrounding content, it is equivalent toisolate
, but within the box content is ordered as ifbidi-override
were specified. plaintext
- This value behaves as
isolate
except that for the purposes of the Unicode bidirectional algorithm, the base directionality of each of the box's bidi paragraphs (if a block container) or isolated sequences (if an inline) is determined by following the heuristic in rules P2 and P3 of the Unicode bidirectional algorithm (rather than by using thedirection
property of the box).
In addition, all CSS properties also accept the following CSS-wide keyword values as the sole component of their property value:
initial
- Represents the value specified as the property's initial value.
inherit
- Represents the computed value of the property on the element's parent.
unset
- This value acts as either
inherit
orinitial
, depending on whether the property is inherited or not. In other words, it sets all properties to their parent value if they are inheritable or to their initial value if not inheritable.
General Information
- Initial Value
normal
- Applies To
- All elements, however some values have no effect on non-inline elements
- Inherited?
- No
- Media
- Visual
Example Code
Official Specifications
- CSS Writing Modes Level 3 (W3C Candidate Recommendation, 15 December 2015)
- CSS Level 2.1 (W3C Recommendation 07 June 2011)