CKTIS / CSS
text-emphasis-color — emphasis mark color
The text-emphasis-color property sets the color of emphasis marks beside text, independently of the letters' color. It is inherited, and its initial value, currentcolor, makes the marks follow the color property.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate
Syntax
text-emphasis-color: <color>;text-emphasis-color sets the color of emphasis marks, used especially in East Asian typography. It accepts a <color> value, such as red or #c00. It does not change the letters' color or the underline color.
The property is inherited. Its initial value, currentcolor, is resolved after inheritance against the element's own color; by default, the marks therefore follow that element's text color.
Color alone does not create marks: text-emphasis-style initially has the value none. Set a style such as filled circle, and control placement through text-emphasis-position. The text-emphasis shorthand sets style and color; omitting the color resets it to its initial value, but does not reset position.
The example places a red filled circle above each of three black characters. Mark size and spacing depend on the font.
Examples
<!doctype html>
<html lang="ja">
<meta charset="utf-8">
<title>text-emphasis-color</title>
<style>
p {
color: black;
font-size: 32px;
line-height: 2;
text-emphasis-style: filled circle;
text-emphasis-position: over right;
text-emphasis-color: red;
}
</style>
<p>日本語</p>
</html>Result
日本語 — black text with a red filled-circle emphasis mark above each of the three characters.
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.