summaryrefslogtreecommitdiff
path: root/docs/modules/theme/pages/callout.adoc
blob: 1319a0c811a39c387e1f8c9c83bed13f935e90b5 (plain) (blame)
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
= Callout List and Number Category Keys
:description: Reference list of the available callout list and callout number (conum) category keys and their value types.
:navtitle: Callout List and Number
:source-language: yaml

[#callout-list]
== callout-list

The keys in the `callout-list` category control the arrangement and style of callout lists and callout list item content.
These keys don't affect the callout list markers.
The appearance of the markers is controlled separately by the keys in <<conum,conum category>>.
Also see <<inherit>> for more information.

[cols="3,4,5a"]
|===
|Key |Value Type |Example

|<<inherit,font-color>>
|xref:color.adoc[Color] +
(default: _inherit_)
|[source]
callout-list:
  font-color: #555555

|<<inherit,font-family>>
|xref:font-support.adoc[Font family name] +
(default: _inherit_)
|[source]
callout-list:
  font-family: M+ 1p

|<<inherit,font-kerning>>
|`normal` {vbar} `none` +
(default: _inherit_)
|[source]
callout-list:
  font-kerning: none

|<<inherit,font-size>>
|xref:text.adoc#font-size[Font size] +
(default: _inherit_)
|[source]
callout-list:
  font-size: 9

|<<inherit,font-style>>
|xref:text.adoc#font-style[Font style] +
(default: _inherit_)
|[source]
callout-list:
  font-style: italic

|item-spacing
|xref:measurement-units.adoc[Measurement] +
(default: `$list-item-spacing`)
|[source]
callout-list:
  item-spacing: 3

|<<inherit,line-height>>
|xref:language.adoc#values[Number] +
(default: _inherit_)
|[source]
callout-list:
  line-height: 1

|margin-top-after-code
|xref:measurement-units.adoc[Measurement] +
(default: `-6`)
|[source]
callout-list:
  margin-top-after-code: 0

|marker-font-color
|xref:color.adoc[Color] +
(default: `$conum-font-color`)
|[source]
callout-list:
  marker-font-color: #000000

|text-align
|xref:text.adoc#text-align[Text alignment] +
(default: `$list-text-align`)
|[source]
callout-list:
  text-align: left

|text-transform
|xref:text.adoc#transform[Text transform] +
(default: _inherit_)
|[source]
callout-list:
  text-transform: lowercase
|===

[#conum]
== conum

The keys in the `conum` category control the style of callout numbers inside verbatim blocks and in callout lists.

NOTE: The bundled font used by the default theme for conums (M+ 1mn) only supports callout numbers 1-20.
If you need more callout numbers, you must specify the `glyphs` key to remap the callout numbers to Unicode value using Unicode escape ranges.
Keep in mind that the font you specify must provide the glyphs for these Unicode values or else the callout number won't be rendered.

These keys don't affect the callout list item content.
The appearance of the callout list and the content of the list items are controlled separately by the keys in <<callout-list,callout-list category>>.
Also see <<inherit>> for more information.

[cols="2,5,5a"]
|===
|Key |Value Type |Example

|<<inherit,font-color>>
|xref:color.adoc[Color] +
(default: _inherit_)
|[source]
conum:
  font-color: #B12146

|<<glyphs,font-family>>
|xref:font-support.adoc[Font family name] +
(default: _inherit_)
|[source]
conum:
  font-family: M+ 1mn

|<<inherit,font-kerning>>
|`none` {vbar} `normal` +
(default: _inherit_)
|[source]
conum:
  font-kerning: none

|<<inherit,font-size>>
|xref:text.adoc#font-size[Font size] +
(default: _inherit_)
|[source]
conum:
  font-size: $base-font-size

|<<inherit,font-style>>
|xref:text.adoc#font-style[Font style] +
(default: _inherit_)
|[source]
conum:
  font-style: normal

|<<glyphs,glyphs>>
|`circled` {vbar} `filled` {vbar} Unicode escape ranges +
(default: `circled`)
|[source]
conum:
  glyphs: \u2776-\u277f,\u24eb-\u24f4,\u3251-\u325a

|<<inherit,line-height>>
|xref:language.adoc#values[Number] +
(default: `1.15`)
|[source]
conum:
  line-height: 4 / 3
|===

[#glyphs]
=== font-family and glyphs

When a font is assigned to the `conum-font-family` key, it must contain the circle numbers starting at glyph U+2460, otherwise you must also assign a range of Unicode numbers to the `conum-glyphs` key.
The glyphs can be specified as a comma-separated list of ranges, where the range values are Unicode numbers (e.g., \u2460).
Unicode escape sequences are recognized even if the value is not enclosed in double quotes.

[#inherit]
== font-* and line-height inheritance

When the `font-color`, `font-family`, `font-kerning`, `font-size`, `font-style`, and `line-height` keys are set on the `callout-list` category they apply solely to the callout list item content, not the callout list markers.
The inverse is also true.
When these properties are set under the `conum` category, they only affect the callout list markers.
This means that if you change the value of a font or line height key on the `callout-list` or `conum` category, then you likely need to change the value of the same key on the other category as well.