Compare Revisions

:dir()

Change Revisions

Revision 297017:

Revision 297017 by teoli on

Revision 297018:

Revision 297018 by teoli on

Title:
:dir
:dir
Slug:
CSS/:dir
CSS/:dir
Tags:
"css", "CSS4", "CSS Reference", "Selectors4"
"css", "CSS4", "CSS Reference", "Selectors4"
Content:

Revision 297017
Revision 297018
n23      Also <code>:dir()</code> uses only the semantic value of thn23      Also <code>:dir()</code> considers only the <em>semantic</e
>e directionality, the one defined in the document, most of the ti>m> value of the directionality, the one defined in the document, 
>me in HTML. It won't consider styling directionality, the one set>most of the time in HTML. It won't consider <em>styling</em> dire
> by CSS properties like {{ cssxref("direction") }} which is purel>ctionality, the one set by CSS properties like {{ cssxref("direct
>y stylistic.>ion") }} which are purely stylistic.
tt34    <pre class="brush:html;">
35&lt;div dir="rtl"&gt;
36  &lt;span&gt;test1&lt;/span&gt;
37  &lt;div dir="ltr"&gt;test2
38    &lt;div dir="auto"&gt;&amp;#05D00;&amp;#05D01;&lt;/div&gt;
39  &lt;/div&gt;
40&lt;/div&gt;
41</pre>
42    <p>
43      In this example <code>:dir(rtl)</code> will match the top l
 >evel div, span containing <code>test1</code>, and the div with th
 >e hebrew characters. <code>:dir(ltr)</code> will match the div co
 >ntaining <code>test2.</code>
44    </p>

Back to History