CKTIS / CSS
text-orientation — text orientation
The text-orientation property controls character orientation in vertical typesetting. It does not establish vertical layout itself.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
text-orientation: mixed | upright | sideways;text-orientation applies only in writing modes that use vertical typography: vertical-rl and vertical-lr. It has no effect in modes that use horizontal typography, including sideways-rl and sideways-lr, whose lines run vertically even though the text is typeset horizontally. The property is inherited; its initial value is mixed.
With mixed, orientation depends on the character, not just its script. ASCII letters such as those in ABC rotate 90° clockwise, whereas fullwidth Latin letters such as A stay upright. upright keeps Latin letters unrotated. sideways typesets all text as horizontal text, then rotates it 90° clockwise.
The specification requires upright to force the used direction to ltr and treat characters as strong LTR for bidirectional reordering. Check RTL behavior in the target browser.
Examples
<!doctype html>
<meta charset="utf-8">
<title>text-orientation</title>
<style>
main { display: flex; gap: 24px; }
p { margin: 0; }
.sample {
writing-mode: vertical-rl;
font: 32px monospace;
height: 180px;
border: 1px solid;
}
.mixed { text-orientation: mixed; }
.upright { text-orientation: upright; }
.sideways { text-orientation: sideways; }
</style>
<main>
<section><h2>mixed</h2><p class="sample mixed">ABC</p></section>
<section><h2>upright</h2><p class="sample upright">ABC</p></section>
<section><h2>sideways</h2><p class="sample sideways">ABC</p></section>
</main>Result
mixed / sideways: ABC rotated 90° clockwise. upright: A, B, C upright, top to bottom.
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.