Code Block Category Keys

code

The keys in the code category control the arrangement and style of literal, listing, and source blocks as well as literal table cells.

Key Value Type Example

background-color

Color
(default: not set)

code:
  background-color: #F5F5F5
yaml

border-color

Color
(default: 'EEEEEE')

code:
  border-color: #CCCCCC
yaml

border-radius

Measurement
(default: not set)

code:
  border-radius: 4
yaml

border-style

Border style
(default: solid)

code:
  border-style: dashed
yaml

border-width

Measurement | Measurement[]
(default: 0.5)

code:
  border-width: [0.75, 0]
yaml

font-color

Color
(default: inherit)

code:
  font-color: #333333
yaml

font-family

Font family name
(default: Courier)

code:
  font-family: M+ 1mn
yaml

font-size

Number
(default: 10.8)

code:
  font-size: 11
yaml

font-style

Font style
(default: inherit)

code:
  font-style: italic
yaml

line-gap

Number
(default: 0)

code:
  line-gap: 3.8
yaml

line-height

Number
(default: 1.2)

code:
  line-height: 1.25
yaml

padding

Measurement | Measurement[]
(default: 9)

code:
  padding: 12mm
yaml

line-gap

The line-gap key is used to tune the height of the background color applied to a span of block text highlighted using Rouge.

code-highlight

The key in the code-highlight category only applies when you use Rouge as the source highlighter. Otherwise, the background color is controlled by the source highlighter theme.

Key Value Type Example

background-color

Color
(default: #FFFFCC)

code:
  highlight-background-color: #FFFF00
yaml

code-linenum

The key in the code-linenum category only applies when you use Pygments as the source highlighter. Otherwise, the font color of line numbers is controlled by the source highlighter theme.

Key Value Type Example

font-color

Color
(default: #999999)

code:
  linenum-font-color: #CCCCCC
yaml