This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the specification changes.
The writing-mode
property defines whether lines of text are laid out horizontally or vertically and the direction in which blocks progress.
The property specifies the block flow direction, which is the direction in which block-level containers are stacked, and the direction in which inline-level content flows within a block container. Thus the writing-mode
property also determines the ordering of block-level content.
Initial value | horizontal-tb |
---|---|
Applies to | all elements except table row groups, table column groups, table rows, and table columns |
Inherited | yes |
Media | visual |
Computed value | as specified |
Animation type | discrete |
Canonical order | the unique non-ambiguous order defined by the formal grammar |
/* Keyword values */ writing-mode: horizontal-tb; writing-mode: vertical-rl; writing-mode: vertical-lr; /* Global values */ writing-mode: inherit; writing-mode: initial; writing-mode: unset;
horizontal-tb
vertical-rl
vertical-lr
sideways-rl
sideways-lr
lr
horizontal-tb
.lr-tb
horizontal-tb
.rl
horizontal-tb
.tb
vertical-lr
.tb-rl
vertical-rl
.horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr
Specification | Status | Comment |
---|---|---|
CSS Writing Modes Module Level 3 The definition of 'writing-mode' in that specification. | Candidate Recommendation | Initial definition |
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | 8-webkit |
(Yes)-webkit (Yes) | 41 (41)[1][3] | 9.0 -ms[2] | 15-webkit | 5.1-webkit |
SVG 1.1 values lr , lr-tb , rl , tb , tb-rl
| 48.0 (uprefixed) | ? | 43 (43) | 9.0 -ms[2] | (Yes) | ? |
sideways-rl,sideways-lr | No support (as of 48.0) | ? | 43 (43) | No support (as of 25) | No support (as of 35.0) | ? |
Feature | Android | Android Webview | Chrome for Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|---|---|
Basic support | 3-webkit | (Yes) | 47-webkit |
(Yes)-webkit (Yes) | 41.0 (41) [1][3] | ? | ? | 5.1 -webkit |
SVG 1.1 values lr , lr-tb , rl , tb , tb-rl
| ? | 48.0 (uprefixed) | 48.0 (uprefixed) | ? | 43.0 (43) | ? | ? | ? |
sideways-rl,sideways-lr | No support[4] | No support | No support | ? | ? | ? | ? | ? |
[1] An experimental implementation was available since Gecko 36. It is governed by the preference layout.css.vertical-text.enabled
, defaulting to false
until Firefox 38. From Firefox 39 and Firefox 40, the preference was true
for Nightly and DevTools editions only. Note that not all CSS widgets (e.g. tables) obey to it, yet. The preference has been removed in Gecko 51 and this property cannot be disabled since this version.
[2] The implementation in Internet Explorer differs from the specification. See the related article in the Internet Explorer Dev Center.
[3] Bidirectional and rtl scripts are supported in vertical modes only since Gecko 42.
writing-mode
attributedirection
unicode-bidi
text-orientation
text-combine-upright
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/writing-mode