1 /* $Id: mandoc.css,v 1.48 2021/03/30 19:26:20 schwarze Exp $ */
3 * Standard style sheet for mandoc(1) -Thtml and man.cgi(8).
5 * Written by Ingo Schwarze <schwarze@openbsd.org>.
6 * I place this file into the public domain.
7 * Permission to use, copy, modify, and distribute it for any purpose
8 * with or without fee is hereby granted, without any conditions.
11 /* Global defaults. */
13 html { max-width: 65em;
16 body { background: var(--bg);
18 font-family: Helvetica,Arial,sans-serif; }
19 h1 { font-size: 110%; }
20 table { margin-top: 0em;
22 border-collapse: collapse; }
23 /* Some browsers set border-color in a browser style for tbody,
24 * but not for table, resulting in inconsistent border styling. */
25 tbody { border-color: inherit; }
26 tr { border-color: inherit; }
27 td { vertical-align: top;
30 border-color: inherit; }
31 ul, ol, dl { margin-top: 0em;
33 li, dt { margin-top: 1em; }
34 pre { font-family: inherit; }
36 .permalink { border-bottom: thin dotted;
39 text-decoration: inherit; }
42 /* Search form and search results. */
44 fieldset { border: thin solid silver;
50 table.results { margin-top: 1em;
54 /* Header and footer lines. */
56 table.head { width: 100%;
57 border-bottom: 1px dotted #808080;
60 td.head-vol { text-align: center; }
64 table.foot { width: 100%;
65 border-top: 1px dotted #808080;
68 td.foot-os { text-align: right; }
70 /* Sections and paragraphs. */
76 h1.Sh { margin-top: 1.2em;
78 margin-left: -3.2em; }
80 h2.Ss { margin-top: 1.2em;
84 .Pp { margin: 0.6em 0em; }
88 /* Displays and lists. */
91 .Bd-indent { margin-left: 3.8em; }
93 .Bl-bullet { list-style-type: disc;
96 .Bl-dash { list-style-type: none;
98 .Bl-dash > li:before {
100 .Bl-item { list-style-type: none;
106 .Bl-enum { padding-left: 2em; }
120 margin-left: 5.5em; }
129 .Bl-tag { margin-top: 0.6em;
130 margin-left: 5.5em; }
135 padding-right: 0.5em;
136 vertical-align: top; }
139 column-count: 1; /* Force block formatting context. */
143 margin-bottom: 0.6em;
144 vertical-align: top; }
145 .Bl-compact { margin-top: 0em; }
147 margin-bottom: 0em; }
152 .Bl-column > tbody > tr { }
153 .Bl-column > tbody > tr > td {
155 .Bl-compact > tbody > tr > td {
158 .Rs { font-style: normal;
159 font-weight: normal; }
161 .RsB { font-style: italic;
162 font-weight: normal; }
165 .RsI { font-style: italic;
166 font-weight: normal; }
167 .RsJ { font-style: italic;
168 font-weight: normal; }
174 .RsT { text-decoration: underline; }
179 .tbl td { vertical-align: middle; }
181 .HP { margin-left: 3.8em;
182 text-indent: -3.8em; }
184 /* Semantic markup for command line utilities. */
187 code.Nm { font-style: normal;
189 font-family: inherit; }
190 .Fl { font-style: normal;
192 font-family: inherit; }
193 .Cm { font-style: normal;
195 font-family: inherit; }
196 .Ar { font-style: italic;
197 font-weight: normal; }
198 .Op { display: inline; }
199 .Ic { font-style: normal;
201 font-family: inherit; }
202 .Ev { font-style: normal;
204 font-family: monospace; }
205 .Pa { font-style: italic;
206 font-weight: normal; }
208 /* Semantic markup for function libraries. */
211 code.In { font-style: normal;
213 font-family: inherit; }
215 .Fd { font-style: normal;
217 font-family: inherit; }
218 .Ft { font-style: italic;
219 font-weight: normal; }
220 .Fn { font-style: normal;
222 font-family: inherit; }
223 .Fa { font-style: italic;
224 font-weight: normal; }
225 .Vt { font-style: italic;
226 font-weight: normal; }
227 .Va { font-style: italic;
228 font-weight: normal; }
229 .Dv { font-style: normal;
231 font-family: monospace; }
232 .Er { font-style: normal;
234 font-family: monospace; }
236 /* Various semantic markup. */
241 .Cd { font-style: normal;
243 font-family: inherit; }
244 .Ad { font-style: italic;
245 font-weight: normal; }
246 .Ms { font-style: normal;
251 /* Physical markup. */
253 .Bf { display: inline; }
254 .No { font-style: normal;
255 font-weight: normal; }
256 .Em { font-style: italic;
257 font-weight: normal; }
258 .Sy { font-style: normal;
260 .Li { font-style: normal;
262 font-family: monospace; }
264 /* Tooltip support. */
266 h1.Sh, h2.Ss { position: relative; }
267 .An, .Ar, .Cd, .Cm, .Dv, .Em, .Er, .Ev, .Fa, .Fd, .Fl, .Fn, .Ft,
268 .Ic, code.In, .Lb, .Lk, .Ms, .Mt, .Nd, code.Nm, .Pa, .Rs,
269 .St, .Sx, .Sy, .Va, .Vt, .Xr {
270 display: inline-block;
271 position: relative; }
273 .An::before { content: "An"; }
274 .Ar::before { content: "Ar"; }
275 .Cd::before { content: "Cd"; }
276 .Cm::before { content: "Cm"; }
277 .Dv::before { content: "Dv"; }
278 .Em::before { content: "Em"; }
279 .Er::before { content: "Er"; }
280 .Ev::before { content: "Ev"; }
281 .Fa::before { content: "Fa"; }
282 .Fd::before { content: "Fd"; }
283 .Fl::before { content: "Fl"; }
284 .Fn::before { content: "Fn"; }
285 .Ft::before { content: "Ft"; }
286 .Ic::before { content: "Ic"; }
287 code.In::before { content: "In"; }
288 .Lb::before { content: "Lb"; }
289 .Lk::before { content: "Lk"; }
290 .Ms::before { content: "Ms"; }
291 .Mt::before { content: "Mt"; }
292 .Nd::before { content: "Nd"; }
293 code.Nm::before { content: "Nm"; }
294 .Pa::before { content: "Pa"; }
295 .Rs::before { content: "Rs"; }
296 h1.Sh::before { content: "Sh"; }
297 h2.Ss::before { content: "Ss"; }
298 .St::before { content: "St"; }
299 .Sx::before { content: "Sx"; }
300 .Sy::before { content: "Sy"; }
301 .Va::before { content: "Va"; }
302 .Vt::before { content: "Vt"; }
303 .Xr::before { content: "Xr"; }
305 .An::before, .Ar::before, .Cd::before, .Cm::before,
306 .Dv::before, .Em::before, .Er::before, .Ev::before,
307 .Fa::before, .Fd::before, .Fl::before, .Fn::before, .Ft::before,
308 .Ic::before, code.In::before, .Lb::before, .Lk::before,
309 .Ms::before, .Mt::before, .Nd::before, code.Nm::before,
310 .Pa::before, .Rs::before,
311 h1.Sh::before, h2.Ss::before, .St::before, .Sx::before, .Sy::before,
312 .Va::before, .Vt::before, .Xr::before {
314 transition: .15s ease opacity;
315 pointer-events: none;
318 box-shadow: 0 0 .35em var(--fg);
319 padding: .15em .25em;
321 font-family: Helvetica,Arial,sans-serif;
324 background: var(--bg);
326 .An:hover::before, .Ar:hover::before, .Cd:hover::before, .Cm:hover::before,
327 .Dv:hover::before, .Em:hover::before, .Er:hover::before, .Ev:hover::before,
328 .Fa:hover::before, .Fd:hover::before, .Fl:hover::before, .Fn:hover::before,
329 .Ft:hover::before, .Ic:hover::before, code.In:hover::before,
330 .Lb:hover::before, .Lk:hover::before, .Ms:hover::before, .Mt:hover::before,
331 .Nd:hover::before, code.Nm:hover::before, .Pa:hover::before,
332 .Rs:hover::before, h1.Sh:hover::before, h2.Ss:hover::before, .St:hover::before,
333 .Sx:hover::before, .Sy:hover::before, .Va:hover::before, .Vt:hover::before,
336 pointer-events: inherit; }
338 /* Overrides to avoid excessive margins on small devices. */
340 @media (max-width: 37.5em) {
342 margin-left: 0.5em; }
343 h1.Sh, h2.Ss { margin-left: 0em; }
344 .Bd-indent { margin-left: 2em; }
347 .Bl-tag { margin-left: 2em; }
350 .HP { margin-left: 2em;
354 /* Overrides for a dark color scheme for accessibility. */
356 @media (prefers-color-scheme: dark) {
357 html { --bg: #1E1F21;
359 :link { color: #BAD7FF; }
360 :visited { color: #F6BAFF; }