CSS generator guides

Measure the Logical Dimensions of Vertical CSS Text

·

Keep the size of a line constant and switch the writing axis. The same two dimensions swap places on screen, which is why logical properties help when you support vertical text.

Writing Mode Tester

Turn a 180 px inline axis vertical

Use the default 180 px inline size, 104 px block size and 18 px font. Load Mixed script. In horizontal-tb, the sample is 180 px wide and 104 px high.

Choose vertical-rl, keep Mixed, and check the same two fields. Lines are now vertical. The container is 104 px wide and 180 px high because inline size follows the text line.

Turn a 180 px inline axis vertical
Writing modePhysical widthPhysical heightBlock progression
horizontal-tb180 px104 pxTop to bottom
vertical-rl104 px180 pxRight to left
vertical-lr104 px180 pxLeft to right

CSS Writing Modes Level 4 block progression and writing-modeCSS Logical Properties Level 1 dimension properties

Separate inline direction from column order

Check Compare all three modes. Compare the first lines for vertical-rl and vertical-lr. The column progression reverses between them. Base direction changes the inline ordering within the writing mode.

Choose Upright under Text orientation. Latin letters stand upright in the vertical preview. Under upright vertical typesetting, CSS uses LTR for direction during layout even if the computed direction declaration remains RTL.

CSS Writing Modes Level 4 block progression and writing-modeCSS Writing Modes Level 4 text-orientation

Apply the selected writing mode to a real box

Download the rule and apply writing-sample to a text block. Inspect its width and height while switching writing-mode. Confirm the order with the same multi-line content.

The stylesheet contains properties and sizes. Bring your text and language metadata separately. Test with the actual font because glyph choice and fallback can change how some characters appear.

CSS Writing Modes Level 4 block progression and writing-modeCSS Logical Properties Level 1 dimension properties

Common questions

Why is Text orientation disabled in the horizontal mode?

The available orientation choices change glyphs in vertical writing. Choose vertical-rl or vertical-lr to apply them.

What does the green sample edge indicate?

It marks inline-start using a logical border. Its physical side depends on the writing mode and the used inline direction.

Sources

Put it into practice.

Related guides