Text

text-emphasis

text-emphasis is a shorthand that puts an emphasis mark on every character, as in Japanese and Chinese typography. It sets the mark shape and color together.

Syntax<'text-emphasis-style'> || <'text-emphasis-color'> …
<'text-emphasis-style'> || <'text-emphasis-color'>

<'text-emphasis-style'> = none
  | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ]
  | <string>

Preview

Aa
Presets
Drag the bottom-right corner to resize

Shorthand breakdown

text-emphasis
filled sesametext-emphasis-style
#e66465text-emphasis-color

Code

.box {
  text-emphasis: filled sesame #e66465;
}

Controls

text-emphasis-stylefilled sesame
text-emphasis-style
filled | open
filled | open
dot | circle | double-circle | triangle | sesame
shape
text-emphasis-color#e66465
Aa

About

Two longhands

  • text-emphasis-style: the mark. Combine filled or open with dot, circle, double-circle, triangle or sesame. If one is left out, the fill defaults to filled and the shape to dot in horizontal text or sesame in vertical text. Any single character such as "★" works too. The initial value is none.
  • text-emphasis-color: the mark color. The initial value is currentcolor (the text color).

Where the marks go

text-emphasis-position decides whether the marks sit above or below, or left or right, of the text. By default they go above horizontal text and to the right of vertical text. The conventions differ by language, so it is not part of the shorthand.

Watch out

  • Spaces and punctuation get no marks.
  • For emphasis in Japanese, text-emphasis reads better than the default italic of em, which Japanese fonts can only fake by slanting.