The CSS text-combine-upright property is used in **vertical writing modes** to combine multiple characters into a **single upright glyph box**. This is especially important for East Asian typography (Japanese, Chinese), where numbers or short words need to stay upright inside vertical text.
Note
β Ideal for numbers (like dates, years, abbreviations)
β Supports combinations up to 4 characters
π¦ Syntax
Syntax
text-combine-upright: none | all | <number>;
/* Examples */
text-combine-upright: none; /* default */
text-combine-upright: all; /* combine entire text */
text-combine-upright: 2; /* combine up to 2 characters */| Value | Description |
|---|---|
| none | No combination (default) |
| all | Combine all characters in the content |
| 1β4 | Combine up to N characters into one upright box |
π¨ 1. Basic Usage
Basic
.vertical {
writing-mode: vertical-rl;
}
.year {
text-combine-upright: 4;
}In vertical writing, the digits "2025" appear **upright** as a single combined unit.
π¨ 2. Using `all` to Combine Entire Content
all
.tag {
writing-mode: vertical-rl;
text-combine-upright: all;
}Forces the browser to keep **all characters upright**, regardless of length.
π¨ 3. Combining Only 2 Characters
2-character
.jp-date {
writing-mode: vertical-rl;
text-combine-upright: 2;
}Ideal for short units like "εΉ΄ε·", "km", "cm", or "5ζ".
π¨ 4. Without Combining (Default)
none
.normal {
writing-mode: vertical-rl;
text-combine-upright: none;
}Characters remain stacked vertically instead of forming a single block.
π¨ 5. Example: Japanese Vertical Date Layout
date layout
.vertical {
writing-mode: vertical-rl;
}
.date {
text-combine-upright: 2;
}"12ζ" or "28ζ₯" appears neatly upright instead of rotating each character.
π§ͺ Real-World Use Cases
1οΈβ£ Vertical Japanese Books or Articles
vertical book
.book {
writing-mode: vertical-rl;
}
.book span {
text-combine-upright: 4; /* years, page numbers */
}2οΈβ£ Vertical UI Labels
ui
.sidebar-label {
writing-mode: vertical-rl;
text-combine-upright: all;
}3οΈβ£ Vertical Scientific Notation (Units)
units
.unit {
writing-mode: vertical-rl;
text-combine-upright: 2;
}Good for inline measurements like β25kgβ or β30cmβ in vertical layouts.
β οΈ Important Notes
- β οΈ Works only when writing-mode is vertical
- β οΈ Combining more than 4 characters may not work depending on browser
- β οΈ Not widely used outside East Asian typography
- β οΈ Does NOT rotateβkeeps content upright
Note
π₯ Summary
text-combine-upright is essential for vertical-writing typography. It ensures small sequences like numbers, units, and abbreviations remain upright, improving readability and preserving typographic tradition.
- none β no combination
- 1β4 β combine up to N characters
- all β combine everything upright
- Requires vertical writing mode