Web design and digital-business ideas grounded in real tasks.

CSS text-spacing-trim controls space around full-width punctuation

Designer studying Japanese typography on a monitor.
AI-generated photographic illustration; not documentary photography.

Two full-width punctuation marks beside one another can leave more apparent space than an editor expects. Changing letter spacing across the entire paragraph is a blunt response. The CSS property text-spacing-trim addresses spacing associated with CJK punctuation more specifically.

MDN’s property reference describes its effect between adjacent punctuation and at line boundaries. At the time of this review, MDN marks it experimental and of limited availability. Treat it as a feature to test, not a guarantee of identical rendering everywhere.

Compare the same paragraph twice

Create two copies of representative Chinese, Japanese or Korean text using the same font, width and size. Apply text-spacing-trim: normal; to one and text-spacing-trim: space-all; to the other. The latter retains full-width punctuation spacing, while the normal behaviour can collapse spacing in specified punctuation combinations.

Use text supplied or reviewed by someone familiar with the language. A row of arbitrary symbols may demonstrate a mechanical change without representing a real reading problem. Include opening and closing punctuation, adjacent marks and lines that wrap naturally.

Keep font and browser in the test record

The property depends on appropriate font support as well as browser implementation. If changing the declaration produces no visible difference, check the actual loaded font and the compatibility information before assuming the CSS was ignored for a mysterious reason.

Resize the paragraph and inspect several line endings. A screenshot at one width can miss the very boundary behaviour being evaluated. Also examine a browser that lacks support: the text must remain readable without the enhancement.

A practical review note records browser version, font, test text and the observed change. Ask whether the spacing fits the publication’s typographic conventions rather than simply whether it looks tighter.

Keep this decision separate from changing the underlying characters. Replacing full-width punctuation with different characters to imitate a visual effect can alter the text itself. A controlled CSS experiment leaves the editorial content available for proper language review.