unicode-bidi

  • Revision slug: CSS/unicode-bidi
  • Revision title: unicode-bidi
  • Revision id: 300187
  • Created:
  • Creator: ethertank
  • Is current revision? No
  • Comment

Revision Content

{{ CSSRef() }}

Summary

The unicode-bidi CSS property together with the {{ Cssxref("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.

Note: This property is intended for DTD designers. Web designers and similar authors should not override it.
  • {{ Xref_cssinitial() }} {{ Cssxref("normal") }}
  • Applies to all elements
  • {{ Xref_cssinherited() }} no
  • Media {{ Xref_cssvisual() }}
  • {{ Xref_csscomputed() }} as specified
  • {{ Xref_cssanimatable() }} {{ xref_cssnotanimatable() }}
  • {{ Xref_csscanonicalorder() }} {{ Xref_cssuniqueorder() }}

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 {{ Cssxref("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 {{ Cssxref("direction") }} property; the implicit part of the bidirectional algorithm is ignored.
isolate {{ experimental_inline() }}
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{{ experimental_inline() }}
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{{ experimental_inline() }}
This keyword makes the elements directionality calculated without considering its parent bidirectional state or the value of the {{ cssxref("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;
} 

Specification

Specification Status Comment
{{ SpecName('CSS3 Writing Modes', '#unicode-bidi', 'unicode-bidi') }} {{ Spec2('CSS3 Writing Modes') }} Added plaintext, isolate, and isolate-override keywords
{{ SpecName('CSS2.1', 'visuren.html#propdef-unicode-bidi', 'unicode-bidi') }} {{ Spec2('CSS2.1') }}  

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 2.0 {{ CompatGeckoDesktop("1.0") }} 5.5 9.2 1.3
isolate{{ experimental_inline() }} 16 {{ property_prefix("-webkit") }} [1] {{ CompatGeckoDesktop("10") }} {{ property_prefix("-moz") }} [2] {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
plaintext{{ experimental_inline() }} {{ CompatNo() }} {{ CompatGeckoDesktop("10") }} {{ property_prefix("-moz") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
isolate-override{{ experimental_inline() }} {{ CompatNo() }} {{ CompatGeckoDesktop("17") }} {{ property_prefix("-moz") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support 1.0 {{ CompatGeckoMobile("1.0") }} 6 8 3.1
isolate{{ experimental_inline() }} {{ CompatUnknown() }} {{ CompatGeckoMobile("10") }} {{ property_prefix("-moz") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
plaintext{{ experimental_inline() }} {{ CompatNo() }} {{ CompatGeckoMobile("10") }} {{ property_prefix("-moz") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
isolate-override{{ experimental_inline() }} {{ CompatNo() }} {{ CompatGeckoMobile("17") }} {{ property_prefix("-moz") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}

[1] Since Chrome 19, the syntax from a previous version of thespec, 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 more possible: only one value is allowed and the previous isolate bidi-override can be described using the new isolate-override keyword.

See also

  • {{ Cssxref("direction") }}

Revision Source

<p>{{ CSSRef() }}</p>
<h2 id="Summary">Summary</h2>
<p>The <code>unicode-bidi</code> <a href="/en/CSS" title="CSS">CSS</a> property together with the {{ Cssxref("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.</p>
<div class="note">
  <strong>Note:</strong> This property is intended for DTD designers. Web designers and similar authors should not override it.</div>
<ul class="cssprop">
  <li><dfn>{{ Xref_cssinitial() }}</dfn> {{ Cssxref("normal") }}</li>
  <li><dfn>Applies to</dfn> all elements</li>
  <li><dfn>{{ Xref_cssinherited() }}</dfn> no</li>
  <li><dfn>Media</dfn> {{ Xref_cssvisual() }}</li>
  <li><dfn>{{ Xref_csscomputed() }}</dfn> as specified</li>
  <li><dfn>{{ Xref_cssanimatable() }}</dfn> {{ xref_cssnotanimatable() }}</li>
  <li><dfn>{{ Xref_csscanonicalorder() }}</dfn> {{ Xref_cssuniqueorder() }}</li>
</ul>
<h2 id="Syntax">Syntax</h2>
<pre class="twopartsyntaxbox">
Formal syntax: normal | embed | isolate | bidi-override | isolate-override | plaintext
</pre>
<pre>
unicode-bidi: normal
unicode-bidi: embed
unicode-bidi: isolate
unicode-bidi: bidi-override
unicode-bidi: isolate-override
unicode-bidi: plaintext

unicode-bidi: inherit
</pre>
<h2 id="Values">Values</h2>
<dl>
  <dt>
    <code>normal</code></dt>
  <dd>
    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.</dd>
  <dt>
    <code>embed</code></dt>
  <dd>
    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 {{ Cssxref("direction") }} property.</dd>
  <dt>
    <code>bidi-override</code></dt>
  <dd>
    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 {{ Cssxref("direction") }} property; the implicit part of the bidirectional algorithm is ignored.</dd>
  <dt>
    <code>isolate</code> {{ experimental_inline() }}</dt>
  <dd>
    This keyword indicates that the element's container directionality should be calculated without considering the content of this element. The element is therefore <em>isolated</em> from its siblings. When applying its bidirectional-resolution algorithm, its container element treats it as one or several <code>U+FFFC Object Replacement Character</code>, i.e. like an image.</dd>
  <dt>
    <code>isolate-override</code>{{ experimental_inline() }}</dt>
  <dd>
    This keyword applies the isolation behavior of the <code>isolate</code> keyword to the surrounding content and the override behavior of the <code>bidi-override</code> keyword to the inner content.</dd>
  <dt>
    <code>plaintext</code>{{ experimental_inline() }}</dt>
  <dd>
    This keyword makes the elements directionality calculated without considering its parent bidirectional state or the value of the {{ cssxref("direction") }} property. The directionality is calculated using the P2 and P3 rules of the Unicode Bidirectional Algorithm.<br />
    This value allows to display data which has already formatted using a tool following the Unicode Bidirectional Algorithm.</dd>
</dl>
<h2 id="Examples">Examples</h2>
<pre class="brush: css">
.bible-quote {
&nbsp;&nbsp;direction: rtl;   
&nbsp;&nbsp;unicode-bidi: embed;
} 
</pre>
<h2 id="Specification">Specification</h2>
<table class="standard-table">
  <thead>
    <tr>
      <th scope="col">Specification</th>
      <th scope="col">Status</th>
      <th scope="col">Comment</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>{{ SpecName('CSS3 Writing Modes', '#unicode-bidi', 'unicode-bidi') }}</td>
      <td>{{ Spec2('CSS3 Writing Modes') }}</td>
      <td>Added <code>plaintext</code>, <code>isolate</code>, and <code>isolate-override</code> keywords</td>
    </tr>
    <tr>
      <td>{{ SpecName('CSS2.1', 'visuren.html#propdef-unicode-bidi', 'unicode-bidi') }}</td>
      <td>{{ Spec2('CSS2.1') }}</td>
      <td>&nbsp;</td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari (WebKit)</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>2.0</td>
        <td>{{ CompatGeckoDesktop("1.0") }}</td>
        <td>5.5</td>
        <td>9.2</td>
        <td>1.3</td>
      </tr>
      <tr>
        <td><code>isolate</code>{{ experimental_inline() }}</td>
        <td>16 {{ property_prefix("-webkit") }} [1]</td>
        <td>{{ CompatGeckoDesktop("10") }} {{ property_prefix("-moz") }} [2]</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
      </tr>
      <tr>
        <td><code>plaintext</code>{{ experimental_inline() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatGeckoDesktop("10") }} {{ property_prefix("-moz") }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
      </tr>
      <tr>
        <td><code>isolate-override</code>{{ experimental_inline() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatGeckoDesktop("17") }} {{ property_prefix("-moz") }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE&nbsp;Phone</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>1.0</td>
        <td>{{ CompatGeckoMobile("1.0") }}</td>
        <td>6</td>
        <td>8</td>
        <td>3.1</td>
      </tr>
      <tr>
        <td><code>isolate</code>{{ experimental_inline() }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatGeckoMobile("10") }} {{ property_prefix("-moz") }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
      </tr>
      <tr>
        <td><code>plaintext</code>{{ experimental_inline() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatGeckoMobile("10") }} {{ property_prefix("-moz") }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
      </tr>
      <tr>
        <td><code>isolate-override</code>{{ experimental_inline() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatGeckoMobile("17") }} {{ property_prefix("-moz") }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<p id="Chrome_note">[1] Since Chrome 19, the syntax from a previous version of thespec, where the <code>isolate</code> keyword could be used together with <code>bidi-override</code>, is allowed.</p>
<p>[2] From Firefox 10 to Firefox 16 included, the old version of the spec, where the <code>isolate</code> keyword could be used together with <code>bidi-override</code>, was implemented. From Firefox 17, this is no more possible: only one value is allowed and the previous <code>isolate bidi-override</code> can be described using the new <code>isolate-override</code> keyword.</p>
<h2 id="See_also">See also</h2>
<ul>
  <li>{{ Cssxref("direction") }}</li>
</ul>
Revert to this revision