1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
|
= Code Block Category Keys
:description: Reference list of the available code block (listing, literal, and source) category keys and their value types.
:navtitle: Code Block
:source-language: yaml
[#code]
== code
The keys in the `code` category control the arrangement and style of literal, listing, and source blocks as well as literal table cells.
[cols="3,4,5a"]
|===
|Key |Value Type |Example
|background-color
|xref:color.adoc[Color] +
(default: _not set_)
|[source]
code:
background-color: #F5F5F5
|border-color
|xref:blocks.adoc#border-color[Color] +
(default: `'EEEEEE'`)
|[source]
code:
border-color: #CCCCCC
|border-radius
|xref:blocks.adoc#radius[Measurement] +
(default: _not set_)
|[source]
code:
border-radius: 4
|border-style
|xref:blocks.adoc#border-style[Border style] +
(default: `solid`)
|[source]
code:
border-style: dashed
|border-width
|xref:blocks.adoc#border-width[Measurement] {vbar} xref:blocks.adoc#border-width[Measurement[\]] +
(default: `0.5`)
|[source]
code:
border-width: [0.75, 0]
|font-color
|xref:color.adoc[Color] +
(default: _inherit_)
|[source]
code:
font-color: #333333
|font-family
|xref:font-support.adoc[Font family name] +
(default: `Courier`)
|[source]
code:
font-family: M+ 1mn
|font-size
|xref:text.adoc#font-size[Font size] +
(default: `10.8`)
|[source]
code:
font-size: 11
|font-style
|xref:text.adoc#font-style[Font style] +
(default: _inherit_)
|[source]
code:
font-style: italic
|<<line-gap,line-gap>>
|xref:language.adoc#values[Number] +
(default: `0`)
|[source]
code:
line-gap: 3.8
|line-height
|xref:language.adoc#values[Number] +
(default: `1.2`)
|[source]
code:
line-height: 1.25
|padding
|xref:blocks.adoc#padding[Measurement] {vbar} xref:blocks.adoc#padding[Measurement[\]] +
(default: `9`)
|[source]
code:
padding: 12mm
|===
[#line-gap]
=== 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.
[#highlight]
== 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.
[cols="2,4,6a"]
|===
|Key |Value Type |Example
|background-color
|xref:color.adoc[Color] +
(default: `#FFFFCC`)
|[source]
code:
highlight-background-color: #FFFF00
|===
[#linenum]
== 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.
[cols="2,4,6a"]
|===
|Key |Value Type |Example
|font-color
|xref:color.adoc[Color] +
(default: `#999999`)
|[source]
code:
linenum-font-color: #CCCCCC
|===
|