text-spacing-trim

A modern property that helps manage the spacing between characters in CJK (Chinese, Japanese, Korean) typography. It specifically handles how 'half-width' punctuation and characters should be spaced to keep the layout looking clean.

It is documented as part of the CSS Text specification. This is an experimental technology. The syntax and behavior are still subject to change.

/* Usage Example */
article.cjk-text {
  /* Trims the extra space from the start of the first line for a cleaner edge */
  text-spacing-trim: trim-start;
}

/* Syntax */
text-spacing-trim: space-all;
text-spacing-trim: normal;
text-spacing-trim: space-first;
text-spacing-trim: trim-start;

/* Global values */
text-spacing-trim: inherit;
text-spacing-trim: initial;
text-spacing-trim: revert;
text-spacing-trim: revert-layer;
text-spacing-trim: unset;
Limited availability Since 2020 71% global usage

This feature is not Baseline because it does not work in some of the most widely-used browsers.

123+
123+

New CSS drops.

Join 750+ readers who've survived clearfix hacks.

ESC