CKTIS / CSS
text-emphasis — text emphasis marks
The CSS `text-emphasis` shorthand sets the style and color of small emphasis marks beside text, especially in East Asian typography. It neither sets nor resets their position.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
text-emphasis: <'text-emphasis-style'> || <'text-emphasis-color'>;text-emphasis combines text-emphasis-style and text-emphasis-color. Both properties are inherited. Marks are drawn beside typographic character units, with ordinary spaces skipped. The shorthand does not impose a general rule for skipping punctuation: Chromium can draw emphasis marks on ordinary punctuation.
The || operator means one or both components may appear, in either order. The style accepts none, a combination of filled or open with dot, circle, double-circle, triangle, or sesame, or a <string>. Omitting the fill implies filled; specifying only the fill selects circle in horizontal typography and sesame in vertical typography. A custom string should contain one character; multiple grapheme clusters may be truncated or ignored.
An omitted component returns to its initial value: none for style or currentcolor for color. Consequently, text-emphasis: red displays no marks. text-emphasis-position remains independent and is not reset by the shorthand.
The example explicitly places dots above horizontal text. Their exact appearance depends on fonts and the browser.
Examples
<!doctype html>
<html lang="ja">
<meta charset="utf-8">
<title>text-emphasis</title>
<style>
p {
writing-mode: horizontal-tb;
font: 32px/2 sans-serif;
color: black;
text-emphasis-position: over right;
text-emphasis: filled dot #b00020;
}
</style>
<p>日本語</p>
</html>Result
日本語 — three black characters, each with a filled dark-red dot above it.
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.