Caption Category Keys

The keys in the caption category control the arrangement and style of block captions globally. In addition to this global caption category, each of the keys listed below, except for the text-decoration keys, can be set on the caption key nested inside the following block categories: code, example, footnotes, image, quote, table, and verse.

The caption-align and caption-text-align keys, when nested on the image or table category, also accept the value inherit. See Block Image Styles and Table Styles for more information about setting inherit on their captions.
Key Value Type Example

align

Block alignment
(default: left)

caption:
  align: right

background-color

Color
(default: not set)

caption:
  background-color: #DDDDDD

font-color

Color
(default: inherit)

caption:
  font-color: #333333

font-family

Font family name
(default: inherit)

caption:
  font-family: M+ 1mn

font-kerning

none | normal
(default: inherit)

caption:
  font-kerning: none

font-size

Number
(default: inherit)

caption:
  font-size: 11

font-style

Font style
(default: italic)

caption:
  font-style: italic

margin-inside

Measurement
(default: 4)

caption:
  margin-inside: 3

margin-outside

Measurement
(default: 0)

caption:
  margin-outside: 0

text-align

Text alignment
(default: $<category>-caption-align or $caption-align)

caption:
  text-align: right

text-decoration

Text decoration
(default: none)

caption:
  text-decoration: line-through

text-decoration-color

Color
(default: $caption-font-color)

caption:
  text-decoration-color: #FF0000

text-decoration-width

Number
(default: $base-text-decoration-width)

caption:
  text-decoration-width: 0.5

text-transform

Text transform
(default: inherit)

caption:
  text-transform: uppercase