CKTIS / CSS
text-autospace — automatic contextual spacing
`text-autospace` controls spacing at boundaries between character classes and around punctuation without changing content or text copied as plain text.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
text-autospace: normal | no-autospace | [ [ ideograph-alpha || ideograph-numeric || punctuation ] || [ insert | replace ] ] | auto;text-autospace is inherited. Its initial value, normal, means ideograph-alpha ideograph-numeric: spacing between ideographs and non-ideographic letters and numerals, respectively. no-autospace disables it; auto lets the browser choose.
punctuation provides language-dependent non-breaking spacing; the current draft defines it only for French. The default insert operates when no Unicode category Z separator is already present. replace additionally replaces U+0020 spacing in rendering; other separators still suppress automatic spacing. Standalone insert or replace assumes normal.
In the syntax, || permits combining components in any order. The effect adds to letter-spacing and word-spacing, rather than replacing them. The specification is a draft: browser compatibility and the example require separate verification; the Chromium 152 scope alone does not establish support.
Examples
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Automatic spacing between Han characters, letters, and digits</title>
<style>
.sample { font: 2rem sans-serif; white-space: nowrap; }
#off { text-autospace: no-autospace; }
#on { text-autospace: ideograph-alpha ideograph-numeric; }
</style>
</head>
<body>
<p>Automatic spacing off:</p>
<p class="sample" id="off" lang="zh">中文CSS中文2026中文</p>
<p>Automatic spacing requested at Han–Latin and Han–digit boundaries:</p>
<p class="sample" id="on" lang="zh">中文CSS中文2026中文</p>
<p id="status"></p>
<script>
const supported = CSS.supports('text-autospace', 'no-autospace') &&
CSS.supports('text-autospace', 'ideograph-alpha ideograph-numeric');
const status = `text-autospace syntax: ${supported ? 'supported' : 'unsupported'}`;
document.getElementById('status').textContent = status;
console.log(status);
const off = document.getElementById('off');
const on = document.getElementById('on');
console.log(`Sample text is identical: ${off.textContent === on.textContent}`);
</script>
</body>
</html>Result
text-autospace syntax: unsupported Sample text is identical: true
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.