Caption Category Keys
The keys in the caption
category control the arrangement and style of block captions globally.
Many of these keys can be customized per block.
caption
The caption-align and caption-text-align keys on the image and table categories 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 |
yaml |
background-color |
Color |
yaml |
end |
top | bottom |
yaml |
font-color |
Color |
yaml |
font-family |
Font family name |
yaml |
font-kerning |
|
yaml |
font-size |
Font size |
yaml |
font-style |
Font style |
yaml |
margin-inside |
Measurement |
yaml |
margin-outside |
Measurement |
yaml |
text-align |
Text alignment |
yaml |
text-decoration |
Text decoration |
yaml |
text-decoration-color |
Color |
yaml |
text-decoration-width |
Number |
yaml |
text-transform |
Text transform |
yaml |
Caption per block
In addition to the global caption
category, each of the keys listed in caption, 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
-
verse
For example, to configure the caption just for code blocks, use the following declaration:
code:
caption:
background-color: #FF0000
font-color: #FFFFFF
font-size: 1em
font-style: bold
If a key is not specified on a block category, the key from the global caption
category will be used as a fallback.