Writing Mode
Sets whether lines of text are laid out horizontally or vertically.
Widely available
This feature is well established and works across many devices and browser versions.
| Class | Style |
|---|---|
wm-htb | writing-mode: horizontal-tb; |
wm-slr | writing-mode: sideways-lr; |
wm-srl | writing-mode: sideways-rl; |
wm-vlr | writing-mode: vertical-lr; |
wm-vrl | writing-mode: vertical-rl; |
Horizontal Top to Bottom
Lines of text are laid out horizontally, read from top to bottom. This is the default writing mode.
Sphinx of black quartz, judge my vow.
<div class="fs-md wm-htb c-slate"> <p>Sphinx of black quartz, judge my vow.</p></div>Vertical Right to Left
Lines of text are laid out vertically, read from right to left.
Sphinx of black quartz, judge my vow.
<div class="fs-md wm-vrl c-slate h-32"> <p>Sphinx of black quartz, judge my vow.</p></div>Vertical Left to Right
Lines of text are laid out vertically, read from left to right.
Sphinx of black quartz, judge my vow.
<div class="fs-md wm-vlr c-slate h-32"> <p>Sphinx of black quartz, judge my vow.</p></div>Sideways Right to Left
Lines of text are laid out vertically, with characters rotated sideways, read from right to left.
Sphinx of black quartz, judge my vow.
<div class="fs-md wm-srl c-slate h-32"> <p>Sphinx of black quartz, judge my vow.</p></div>Sideways Left to Right
Lines of text are laid out vertically, with characters rotated sideways, read from left to right.
Sphinx of black quartz, judge my vow.
<div class="fs-md wm-slr c-slate h-32"> <p>Sphinx of black quartz, judge my vow.</p></div>Using utility variants
Learn how to override existing utilities based on the user's screen size or other factors, such as hover states.
Targeting different viewports
You can combine responsive breakpoints like sm:wm-*, md:wm-*, lg:wm-*, and xxl:wm-* to allow targeting specific utilities in different viewports.
Targeting hover states
Alternatively, you can apply :hover by using h:wm-* utility to override elements and change their values when hovering over them.