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 |
|
background-color |
Color |
|
end |
top | bottom |
|
font-color |
Color |
|
font-family |
Font family name |
|
font-kerning |
|
|
font-size |
Font size |
|
font-style |
Font style |
|
margin-inside |
Measurement |
|
margin-outside |
Measurement |
|
text-align |
Text alignment |
|
text-decoration |
Text decoration |
|
text-decoration-color |
Color |
|
text-decoration-width |
Number |
|
text-transform |
Text transform |
|
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.