-
Notifications
You must be signed in to change notification settings - Fork 22.4k
/
index.md
60 lines (46 loc) · 2.03 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
title: writing-mode
slug: Web/SVG/Attribute/writing-mode
page-type: svg-attribute
browser-compat: svg.global_attributes.writing-mode
---
{{SVGRef}}
The **`writing-mode`** attribute specifies whether the initial inline-progression-direction for a {{SVGElement("text")}} element shall be left-to-right, right-to-left, or top-to-bottom. The `writing-mode` attribute applies only to {{ SVGElement("text") }} elements; the attribute is ignored for {{ SVGElement("tspan") }}, {{ SVGElement("tref") }}, and {{ SVGElement("textPath") }} sub-elements. (Note that the inline-progression-direction can change within a {{ SVGElement("text") }} element due to the Unicode bidirectional algorithm and properties {{ SVGAttr("direction") }} and {{ SVGAttr("unicode-bidi") }}.)
> **Note:** As a presentation attribute, `writing-mode` can be used as a CSS property. See the CSS {{cssxref("writing-mode")}} property for more information.
You can use this attribute with the following SVG elements:
- {{SVGElement("text")}}
- {{SVGElement("textPath")}}
- {{SVGElement("tref")}}
- {{SVGElement("tspan")}}
## Usage notes
<table class="properties">
<tbody>
<tr>
<th scope="row">Default value</th>
<td><code>horizontal-tb</code></td>
</tr>
<tr>
<th scope="row">Value</th>
<td>
<code>horizontal-tb</code> | <code>vertical-rl</code> |
<code>vertical-lr</code>
</td>
</tr>
<tr>
<th scope="row">Animatable</th>
<td>Yes</td>
</tr>
</tbody>
</table>
- `horizontal-tb`
- : This value defines a top-to-bottom block flow direction. Both the writing mode and the typographic mode are horizontal.
- `vertical-rl`
- : This value defines a right-to-left block flow direction. Both the writing mode and the typographic mode are vertical.
- `vertical-lr`
- : This value defines a left-to-right block flow direction. Both the writing mode and the typographic mode are vertical.
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}
## See also
- {{cssxref("writing-mode", "CSS writing-mode")}}