Dieser Artikel benötigt eine redaktionelle Überprüfung. So können Sie helfen.
Diese Übersetzung ist unvollständig. Bitte helfen Sie, diesen Artikel aus dem Englischen zu übersetzen.
Zusammenfassung
Die unicode-bidi CSS Eigenschaft zusammen mit der direction Eigenschaft hat damit zu tun wie bidirektionaler Text in einem Dokument behandelt wird. Zum Beispiel, wenn ein Textblock sowohl Text der von links nach recht als auch von rechts nach links läuft enthält, dann entscheidet das System mithilfe eines komplexen Unicode Algorithmus wie es den Text darstellen soll. Diese Eigenschaft überschreibt den Algorithmus und gibt dem Entwickler die Kontrolle über die Textdarstellung.
Die unicode-bidi unddirection Eigenschaften sind die einzigen zwei Werte welche nicht von der all Kurzform betroffen sind.
| Initialwert | normal |
|---|---|
| Anwendbar auf | Alle Elemente, einige Werte haben keine Wirkung bei non-inline Elementen |
| Vererbt | Nein |
| Medien | visuell |
| Berechneter Wert | wie angegeben |
| Animierbar | Nein |
| Kanonische Reihenfolge | die eindeutige Reihenfolge definiert durch die formale Grammatik |
Syntax
/* Schlüsselwerte */ unicode-bidi: normal; unicode-bidi: embed; unicode-bidi: isolate; unicode-bidi: bidi-override; unicode-bidi: isolate-override; unicode-bidi: plaintext; /* Globale Werte*/ unicode-bidi: inherit; unicode-bidi: initial; unicode-bidi: unset;
Werte
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
directionproperty. 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
directionproperty; 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
isolatekeyword to the surrounding content and the override behavior of thebidi-overridekeyword to the inner content. plaintext- This keyword makes the elements directionality calculated without considering its parent bidirectional state or the value of the
directionproperty. 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.
Formaler Syntax
normal | embed | isolate | bidi-override | isolate-override | plaintext
Beispiele
.bible-quote {
direction: rtl;
unicode-bidi: embed;
}
Spezifikation
| Specification | Status | Comment |
|---|---|---|
| CSS Writing Modes Module Level 3 Die Definition von 'unicode-bidi' in dieser Spezifikation. |
Anwärter Empfehlung | Added plaintext, isolate, and isolate-override keywords |
| CSS Level 2 (Revision 1) Die Definition von 'unicode-bidi' in dieser Spezifikation. |
Empfehlung | Initial definition |
Browser Kompatibilität
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
|---|---|---|---|---|---|
| Basic support | 2.0 | 1.0 (1.7 oder früher) | 5.5 | 9.2 | 1.3 |
isolate |
16 -webkit [1] 48.0 (unprefixed) |
10 (10) -moz [2] | Nicht unterstützt | Nicht unterstützt | Nicht unterstützt |
plaintext |
48.0 (unprefixed) | 10 (10) -moz | Nicht unterstützt | Nicht unterstützt | Nicht unterstützt |
isolate-override |
48.0 (unprefixed) | 17 (17) -moz | Nicht unterstützt | Nicht unterstützt | Nicht unterstützt |
| Feature | Android | Android Webview | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile | Chrome for Android |
|---|---|---|---|---|---|---|---|
| Basic support | 1.0 | (Ja) | 1.0 (1.0) | 6 | 8 | 3.1 | (Ja) |
isolate |
? | 48.0 | 10.0 (10) -moz | Nicht unterstützt | Nicht unterstützt | Nicht unterstützt | 48.0 |
plaintext |
Nicht unterstützt | 48.0 | 10.0 (10) -moz [3] | Nicht unterstützt | Nicht unterstützt | Nicht unterstützt | 48.0 |
isolate-override |
Nicht unterstützt | 48.0 | 17.0 (17) -moz | Nicht unterstützt | Nicht unterstützt | Nicht unterstützt | 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.