1 /* $Id: mandoc.css,v 1.46 2019/06/02 16:57:13 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; }
35 .permalink { border-bottom: thin dotted;
38 text-decoration: inherit; }
41 /* Search form and search results. */
43 fieldset { border: thin solid silver;
49 table.results { margin-top: 1em;
53 /* Header and footer lines. */
55 table.head { width: 100%;
56 border-bottom: 1px dotted #808080;
59 td.head-vol { text-align: center; }
63 table.foot { width: 100%;
64 border-top: 1px dotted #808080;
67 td.foot-os { text-align: right; }
69 /* Sections and paragraphs. */
75 h1.Sh { margin-top: 1.2em;
77 margin-left: -3.2em; }
79 h2.Ss { margin-top: 1.2em;
83 .Pp { margin: 0.6em 0em; }
87 /* Displays and lists. */
90 .Bd-indent { margin-left: 3.8em; }
92 .Bl-bullet { list-style-type: disc;
95 .Bl-dash { list-style-type: none;
97 .Bl-dash > li:before {
99 .Bl-item { list-style-type: none;
105 .Bl-enum { padding-left: 2em; }
119 margin-left: 5.5em; }
128 .Bl-tag { margin-top: 0.6em;
129 margin-left: 5.5em; }
134 padding-right: 0.5em;
135 vertical-align: top; }
141 margin-bottom: 0.6em;
144 .Bl-compact { margin-top: 0em; }
146 margin-bottom: 0em; }
151 .Bl-column > tbody > tr { }
152 .Bl-column > tbody > tr > td {
154 .Bl-compact > tbody > tr > td {
157 .Rs { font-style: normal;
158 font-weight: normal; }
160 .RsB { font-style: italic;
161 font-weight: normal; }
164 .RsI { font-style: italic;
165 font-weight: normal; }
166 .RsJ { font-style: italic;
167 font-weight: normal; }
173 .RsT { text-decoration: underline; }
178 .tbl td { vertical-align: middle; }
180 .HP { margin-left: 3.8em;
181 text-indent: -3.8em; }
183 /* Semantic markup for command line utilities. */
186 code.Nm { font-style: normal;
188 font-family: inherit; }
189 .Fl { font-style: normal;
191 font-family: inherit; }
192 .Cm { font-style: normal;
194 font-family: inherit; }
195 .Ar { font-style: italic;
196 font-weight: normal; }
197 .Op { display: inline; }
198 .Ic { font-style: normal;
200 font-family: inherit; }
201 .Ev { font-style: normal;
203 font-family: monospace; }
204 .Pa { font-style: italic;
205 font-weight: normal; }
207 /* Semantic markup for function libraries. */
210 code.In { font-style: normal;
212 font-family: inherit; }
214 .Fd { font-style: normal;
216 font-family: inherit; }
217 .Ft { font-style: italic;
218 font-weight: normal; }
219 .Fn { font-style: normal;
221 font-family: inherit; }
222 .Fa { font-style: italic;
223 font-weight: normal; }
224 .Vt { font-style: italic;
225 font-weight: normal; }
226 .Va { font-style: italic;
227 font-weight: normal; }
228 .Dv { font-style: normal;
230 font-family: monospace; }
231 .Er { font-style: normal;
233 font-family: monospace; }
235 /* Various semantic markup. */
240 .Cd { font-style: normal;
242 font-family: inherit; }
243 .Ad { font-style: italic;
244 font-weight: normal; }
245 .Ms { font-style: normal;
250 /* Physical markup. */
252 .Bf { display: inline; }
253 .No { font-style: normal;
254 font-weight: normal; }
255 .Em { font-style: italic;
256 font-weight: normal; }
257 .Sy { font-style: normal;
259 .Li { font-style: normal;
261 font-family: monospace; }
263 /* Tooltip support. */
265 h1.Sh, h2.Ss { position: relative; }
266 .An, .Ar, .Cd, .Cm, .Dv, .Em, .Er, .Ev, .Fa, .Fd, .Fl, .Fn, .Ft,
267 .Ic, code.In, .Lb, .Lk, .Ms, .Mt, .Nd, code.Nm, .Pa, .Rs,
268 .St, .Sx, .Sy, .Va, .Vt, .Xr {
269 display: inline-block;
270 position: relative; }
272 .An::before { content: "An"; }
273 .Ar::before { content: "Ar"; }
274 .Cd::before { content: "Cd"; }
275 .Cm::before { content: "Cm"; }
276 .Dv::before { content: "Dv"; }
277 .Em::before { content: "Em"; }
278 .Er::before { content: "Er"; }
279 .Ev::before { content: "Ev"; }
280 .Fa::before { content: "Fa"; }
281 .Fd::before { content: "Fd"; }
282 .Fl::before { content: "Fl"; }
283 .Fn::before { content: "Fn"; }
284 .Ft::before { content: "Ft"; }
285 .Ic::before { content: "Ic"; }
286 code.In::before { content: "In"; }
287 .Lb::before { content: "Lb"; }
288 .Lk::before { content: "Lk"; }
289 .Ms::before { content: "Ms"; }
290 .Mt::before { content: "Mt"; }
291 .Nd::before { content: "Nd"; }
292 code.Nm::before { content: "Nm"; }
293 .Pa::before { content: "Pa"; }
294 .Rs::before { content: "Rs"; }
295 h1.Sh::before { content: "Sh"; }
296 h2.Ss::before { content: "Ss"; }
297 .St::before { content: "St"; }
298 .Sx::before { content: "Sx"; }
299 .Sy::before { content: "Sy"; }
300 .Va::before { content: "Va"; }
301 .Vt::before { content: "Vt"; }
302 .Xr::before { content: "Xr"; }
304 .An::before, .Ar::before, .Cd::before, .Cm::before,
305 .Dv::before, .Em::before, .Er::before, .Ev::before,
306 .Fa::before, .Fd::before, .Fl::before, .Fn::before, .Ft::before,
307 .Ic::before, code.In::before, .Lb::before, .Lk::before,
308 .Ms::before, .Mt::before, .Nd::before, code.Nm::before,
309 .Pa::before, .Rs::before,
310 h1.Sh::before, h2.Ss::before, .St::before, .Sx::before, .Sy::before,
311 .Va::before, .Vt::before, .Xr::before {
313 transition: .15s ease opacity;
314 pointer-events: none;
317 box-shadow: 0 0 .35em var(--fg);
318 padding: .15em .25em;
320 font-family: Helvetica,Arial,sans-serif;
323 background: var(--bg);
325 .An:hover::before, .Ar:hover::before, .Cd:hover::before, .Cm:hover::before,
326 .Dv:hover::before, .Em:hover::before, .Er:hover::before, .Ev:hover::before,
327 .Fa:hover::before, .Fd:hover::before, .Fl:hover::before, .Fn:hover::before,
328 .Ft:hover::before, .Ic:hover::before, code.In:hover::before,
329 .Lb:hover::before, .Lk:hover::before, .Ms:hover::before, .Mt:hover::before,
330 .Nd:hover::before, code.Nm:hover::before, .Pa:hover::before,
331 .Rs:hover::before, h1.Sh:hover::before, h2.Ss:hover::before, .St:hover::before,
332 .Sx:hover::before, .Sy:hover::before, .Va:hover::before, .Vt:hover::before,
335 pointer-events: inherit; }
337 /* Overrides to avoid excessive margins on small devices. */
339 @media (max-width: 37.5em) {
341 margin-left: 0.5em; }
342 h1.Sh, h2.Ss { margin-left: 0em; }
343 .Bd-indent { margin-left: 2em; }
346 .Bl-tag { margin-left: 2em; }
349 .HP { margin-left: 2em;
353 /* Overrides for a dark color scheme for accessibility. */
355 @media (prefers-color-scheme: dark) {
356 html { --bg: #1E1F21;
358 :link { color: #BAD7FF; }
359 :visited { color: #F6BAFF; }