How to Inspect and Control CSS text-combine-upright in Safari Web Inspector

When designing vertical typography layouts for East Asian languages (such as Japanese, Chinese, or traditional Korean) or creating modern editorial design spreads, web developers use CSS vertical writing modes (writing-mode: vertical-rl or vertical-lr). In vertical text flows, standard characters are stacked vertically from top to bottom. However, short Latin words, dates, acronyms, or numbers (such as “2024”, “10th”, or “AM”) disrupt reading cadence when rendered as a single vertical column of characters.

The typographic technique of fitting short horizontal runs of text inside a vertical line is known as Tate-chū-yoko (縦中横). In modern CSS, this layout behavior is controlled via the text-combine-upright property (formerly prefixed as -webkit-text-combine in older WebKit releases). Safari on macOS and iOS provides robust native support for vertical writing and Tate-chū-yoko. Using Safari Web Inspector, web developers can inspect, test, and fine-tune character fitting, font scaling, and alignment directly inside the browser canvas.

Understanding the text-combine-upright Property

The text-combine-upright property instructs the browser layout engine to combine characters that appear in the horizontal writing mode into the space of a single vertical character box (an em box). The property accepts three primary values:

  • none: Default behaviour. Characters are rendered vertically according to the container’s writing mode.
  • all: Compresses all characters inside the targeted inline element horizontally into the space of one full-width vertical character box.
  • digits <integer>: Automatically combines consecutive ASCII digits up to the specified limit (typically 2, 3, or 4 digits) into an upright horizontal block without requiring manual inline tags.

In standard CSS markup, short horizontal numbers are typically wrapped in an inline span:

/* Vertical container with horizontal embedded numbers */
.vertical-article {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
}

.tate-chu-yoko {
    text-combine-upright: all;
    -webkit-text-combine: horizontal; /* Legacy WebKit compatibility */
}

Enabling Developer Features in Safari

To inspect vertical writing layouts in Safari, enable developer features on your Mac:

  1. Open Safari and navigate to Settings (or press Command + ,).
  2. Select the Advanced pane.
  3. Check the option labeled Show features for web developers.
  4. Close the Settings pane.

Right-click the vertical text element on your webpage and select Inspect Element to launch Safari Web Inspector.

Inspecting Vertical Text Elements and Computed Properties

With Safari Web Inspector open, select the target element in the Elements DOM tree. Navigate to the Computed tab in the right-hand panel:

  1. Verify that the container’s writing-mode is actively computed as vertical-rl or vertical-lr.
  2. Locate the text-combine-upright property. Verify whether it computes to all, none, or a vendor-prefixed fallback.
  3. Inspect the font-size and line metrics. When characters are combined upright, WebKit compresses glyph widths horizontally while maintaining optical baseline alignment with the surrounding vertical text.

Testing text-combine-upright Dynamically in the Styles Pane

You can experiment with character combinations and digit limits directly inside Safari Web Inspector’s Styles panel:

  1. Select the inline <span> wrapping your numbers or abbreviations.
  2. In the Styles panel, click within the CSS declaration block to add a new declaration.
  3. Type text-combine-upright: all; and observe the browser instantly reflow the characters into an upright square block.
  4. To test legacy WebKit engine behaviour, add -webkit-text-combine: horizontal;.

If you are testing automated digit combination across long text passages without individual span wrappers, apply the property directly to the container:

/* Automatically combine up to 2 consecutive digits */
.vertical-article {
    text-combine-upright: digits 2;
}

Diagnosing Glyph Distortion and Compression Issues

When combining three or four characters into a single em box (such as a 4-digit calendar year like “2024”), standard glyphs can become excessively compressed and unreadable. In Safari Web Inspector, you can diagnose and resolve these rendering issues using several complementary properties:

  • Font Width Adjustments: Test condensed or narrow font variants using font-stretch: condensed; or variable font axes in the Fonts panel.
  • Manual Spanning: If four digits appear overly cramped, test breaking them into two 2-digit groups or using full-width Japanese numerals (Zen-kaku).
  • Vertical Centering: Check whether vertical-align: middle; or baseline shifts are required to ensure the combined character block sits flush against the vertical reading axis.

By using Safari Web Inspector to inspect computed vertical flow rules and fine-tune text-combine-upright declarations, you ensure polished, authentic, and legible vertical typography across all Apple devices.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.