master
css 303 lines 6.83 KB
Raw
1 /*
2 * Sphinx HTML theme customization: read the doc
3 * Based on Linux Documentation/sphinx-static/theme_overrides.css
4 */
5
6 /* Improve contrast and increase size for easier reading. */
7
8 body {
9 font-family: serif;
10 color: black;
11 font-size: 100%;
12 }
13
14 h1, h2, .rst-content .toctree-wrapper p.caption, h3, h4, h5, h6, legend {
15 font-family: sans-serif;
16 }
17
18 .rst-content dl:not(.docutils) dt {
19 border-top: none;
20 border-left: solid 5px #bcc6d2;
21 background-color: #eaedf1;
22 color: black;
23 }
24
25 .wy-nav-top {
26 background: #802400;
27 }
28
29 .wy-side-nav-search input[type="text"] {
30 border-color: #f60;
31 }
32
33 .wy-menu-vertical p.caption {
34 color: white;
35 }
36
37 .wy-menu-vertical li.current a {
38 color: #505050;
39 }
40
41 .wy-menu-vertical li.on a, .wy-menu-vertical li.current > a {
42 color: #303030;
43 }
44
45 .fa-gitlab {
46 box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 3px 10px 0 rgba(0,0,0,0.19);
47 border-radius: 5px;
48 }
49
50 div[class^="highlight"] pre {
51 font-family: monospace;
52 color: black;
53 font-size: 100%;
54 }
55
56 .wy-menu-vertical {
57 font-family: sans-serif;
58 }
59
60 .c {
61 font-style: normal;
62 }
63
64 p {
65 font-size: 100%;
66 }
67
68 /* Interim: Code-blocks with line nos - lines and line numbers don't line up.
69 * see: https://github.com/rtfd/sphinx_rtd_theme/issues/419
70 */
71
72 div[class^="highlight"] pre {
73 line-height: normal;
74 }
75 .rst-content .highlight > pre {
76 line-height: normal;
77 }
78
79 /* Keep fields from being strangely far apart due to inheirited table CSS. */
80 .rst-content table.field-list th.field-name {
81 padding-top: 1px;
82 padding-bottom: 1px;
83 }
84 .rst-content table.field-list td.field-body {
85 padding-top: 1px;
86 padding-bottom: 1px;
87 }
88
89 /* qmp-example directive styling */
90
91 .rst-content .admonition-example {
92 /* do not apply the standard admonition background */
93 background-color: transparent;
94 border: solid #ffd2ed 1px;
95 }
96
97 .rst-content .admonition-example > .admonition-title:before {
98 content: "▷";
99 }
100
101 .rst-content .admonition-example > .admonition-title {
102 background-color: #5980a6;
103 }
104
105 .rst-content .admonition-example > div[class^="highlight"] {
106 /* make code boxes take up the full width of the admonition w/o margin */
107 margin-left: -12px;
108 margin-right: -12px;
109
110 border-top: 1px solid #ffd2ed;
111 border-bottom: 1px solid #ffd2ed;
112 border-left: 0px;
113 border-right: 0px;
114 }
115
116 .rst-content .admonition-example > div[class^="highlight"]:nth-child(2) {
117 /* If a code box is the second element in an example admonition,
118 * it is the first child after the title. let it sit flush against
119 * the title. */
120 margin-top: -12px;
121 border-top: 0px;
122 }
123
124 .rst-content .admonition-example > div[class^="highlight"]:last-child {
125 /* If a code box is the final element in an example admonition, don't
126 * render margin below it; let it sit flush with the end of the
127 * admonition box */
128 margin-bottom: -12px;
129 border-bottom: 0px;
130 }
131
132 .rst-content .admonition-example .highlight {
133 background-color: #fffafd;
134 }
135
136 /* end qmp-example styling */
137
138 @media screen {
139
140 /* content column
141 *
142 * RTD theme's default is 800px as max width for the content, but we have
143 * tables with tons of columns, which need the full width of the view-port.
144 */
145
146 .wy-nav-content{max-width: none; }
147
148 /* table:
149 *
150 * - Sequences of whitespace should collapse into a single whitespace.
151 * - make the overflow auto (scrollbar if needed)
152 * - align caption "left" ("center" is unsuitable on vast tables)
153 */
154
155 .wy-table-responsive table td { white-space: normal; }
156 .wy-table-responsive { overflow: auto; }
157 .rst-content table.docutils caption { text-align: left; font-size: 100%; }
158
159 /* captions:
160 *
161 * - captions should have 100% (not 85%) font size
162 * - hide the permalink symbol as long as link is not hovered
163 */
164
165 .toc-title {
166 font-size: 150%;
167 font-weight: bold;
168 }
169
170 caption, .wy-table caption, .rst-content table.field-list caption {
171 font-size: 100%;
172 }
173 caption a.headerlink { opacity: 0; }
174 caption a.headerlink:hover { opacity: 1; }
175
176 /* Menu selection and keystrokes */
177
178 span.menuselection {
179 color: blue;
180 font-family: "Courier New", Courier, monospace
181 }
182
183 code.kbd, code.kbd span {
184 color: white;
185 background-color: darkblue;
186 font-weight: bold;
187 font-family: "Courier New", Courier, monospace
188 }
189
190 /* fix bottom margin of lists items */
191
192 .rst-content .section ul li:last-child, .rst-content .section ul li p:last-child {
193 margin-bottom: 12px;
194 }
195
196 /* inline literal: drop the borderbox, padding and red color */
197
198 code, .rst-content tt, .rst-content code {
199 color: inherit;
200 border: none;
201 padding: unset;
202 background: inherit;
203 font-size: 85%;
204 }
205
206 .rst-content tt.literal,.rst-content tt.literal,.rst-content code.literal {
207 color: inherit;
208 }
209 }
210
211 /* QAPI domain theming */
212
213 /* most content in a QAPI object definition should not eclipse about
214 80ch, but nested field lists are explicitly exempt due to their
215 two-column nature */
216 .qapi dd *:not(dl) {
217 max-width: 80ch;
218 }
219
220 /* but the content column itself should still be less than ~80ch. */
221 .qapi .field-list dd {
222 max-width: 80ch;
223 }
224
225 .qapi-infopips {
226 margin-bottom: 1em;
227 }
228
229 .qapi-infopip {
230 display: inline-block;
231 padding: 0em 0.5em 0em 0.5em;
232 margin: 0.25em;
233 }
234
235 .qapi-deprecated,.qapi-unstable {
236 background-color: #fffef5;
237 border: solid #fff176 6px;
238 font-weight: bold;
239 padding: 8px;
240 border-radius: 15px;
241 margin: 5px;
242 }
243
244 .qapi-unstable::before {
245 content: '🚧 ';
246 }
247
248 .qapi-deprecated::before {
249 content: '⚠️ ';
250 }
251
252 .qapi-ifcond::before {
253 /* gaze ye into the crystal ball to determine feature availability */
254 content: '🔮 ';
255 }
256
257 .qapi-ifcond {
258 background-color: #f9f5ff;
259 border: solid #dac2ff 6px;
260 padding: 8px;
261 border-radius: 15px;
262 margin: 5px;
263 }
264
265 /* code blocks */
266 .qapi div[class^="highlight"] {
267 width: fit-content;
268 background-color: #fffafd;
269 border: 2px solid #ffe1f3;
270 }
271
272 /* note, warning, etc. */
273 .qapi .admonition {
274 width: fit-content;
275 }
276
277 /* pad the top of the field-list so the text doesn't start directly at
278 the top border; primarily for the field list labels, but adjust the
279 field bodies as well for parity. */
280 dl.field-list > dt:first-of-type, dl.field-list > dd:first-of-type {
281 padding-top: 0.3em;
282 }
283
284 dl.field-list > dt:last-of-type, dl.field-list > dd:last-of-type {
285 padding-bottom: 0.3em;
286 }
287
288 /* pad the field list labels so they don't crash into the border */
289 dl.field-list > dt {
290 padding-left: 0.5em;
291 padding-right: 0.5em;
292 }
293
294 /* Add a little padding between field list sections */
295 dl.field-list > dd:not(:last-child) {
296 padding-bottom: 1em;
297 }
298
299 /* Sphinx 3.x: unresolved xrefs */
300 .rst-content *:not(a) > code.xref {
301 font-weight: 400;
302 color: #333333;
303 }