CKTIS / CSS
text-spacing-trim — CJK punctuation spacing
text-spacing-trim controls trimming of blank space within CJK punctuation advances according to line position and neighboring characters. It does not remove ordinary spaces.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
text-spacing-trim: normal | auto | space-all | trim-both | trim-all | ([ trim-start | space-start | space-first ] || [ trim-adjacent | space-adjacent ] || [ trim-end | space-end | allow-end ]);text-spacing-trim changes spacing around fullwidth CJK punctuation, not character content. It is inherited and initially normal. Do not confuse it with whitespace removal.
space-all retains full width. trim-start trims opening punctuation at line starts; trim-both covers both edges and adjacent pairs, whereas trim-all acts regardless of context. auto delegates the choice to the browser.
In the syntax, || permits combining groups in any order, with at most one option per group. Omitted groups default to trim-start trim-adjacent allow-end, but normal means space-start trim-adjacent allow-end. allow-end trims the line ending only when it would otherwise not fit before justification.
This is draft specification behavior, not an implementation guarantee. Font design can limit the effect. The example requires local verification in the target Chromium 152 build; declaration acceptance alone does not establish correct rendering.
Examples
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Text spacing trim</title>
<style>
.sample { font: 32px/1.5 serif; white-space: nowrap; border-inline-start: 2px solid; }
#spaced { text-spacing-trim: space-all; }
#trimmed { text-spacing-trim: trim-start; }
</style>
</head>
<body>
<h2>Preserve opening punctuation spacing</h2>
<p id="spaced" class="sample" lang="ja">「日本語」</p>
<h2>Trim opening punctuation spacing at the line start</h2>
<p id="trimmed" class="sample" lang="ja">「日本語」</p>
<script>
for (const [id, value] of [['spaced', 'space-all'], ['trimmed', 'trim-start']]) {
const property = 'text-spacing-trim';
if (CSS.supports(property, value)) {
const computed = getComputedStyle(document.getElementById(id)).getPropertyValue(property);
console.log(`${value}: supported (computed: ${computed})`);
} else {
console.log(`${value}: unsupported`);
}
}
</script>
</body>
</html>Result
space-all: supported (computed: space-all) trim-start: supported (computed: trim-start)
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.