text-orientation

Jwahir Sundai on Updated on
##description##
Ad
`, } ); } })();

The text-orientation property in CSS aligns text in a line when working with a vertical writing-mode. Basically, it rotates either the line by 90° clockwise to help control how vertical languages are displayed — much like the way text-combine-upright rotates groups of characters within a line of text in a vertical script, but for full lines of text.

.element {
  text-orientation: mixed;
  writing-mode: vertical-rl; 
}

For handling bi-directional text — a block that contains both left-to-right and right-to-left text, for example — check out the unicode-bidi property. It’s combined with the direction property to override how the browser decides to display the text.

Syntax

text-orientation: mixed | upright | sideways

Values

/* Keyword values */
text-orientation: mixed; /* default */
text-orientation: upright;
text-orientation: sideways;
text-orientation: sideways-right;

/* Global values */
text-orientation: inherit;
text-orientation: initial; /* mixed */
text-orientation: unset;

use-glyph-orientation was removed as a keyword value in the December 2015. It was used on SVG elements to define SVG properties glyph-orientation-vertical and glyph-orientation-horizontal which are now deprecated. glyph-orientation-vertical is now an alias for text-orientation.

Browser support

Demo

Specification

More information