xref: /freebsd/contrib/mandoc/mandoc.css (revision 7cc42f6d)
1/* $Id: mandoc.css,v 1.46 2019/06/02 16:57:13 schwarze Exp $ */
2/*
3 * Standard style sheet for mandoc(1) -Thtml and man.cgi(8).
4 *
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.
9 */
10
11/* Global defaults. */
12
13html {		max-width: 65em;
14		--bg: #FFFFFF;
15		--fg: #000000; }
16body {		background: var(--bg);
17		color: var(--fg);
18		font-family: Helvetica,Arial,sans-serif; }
19h1 {		font-size: 110%; }
20table {		margin-top: 0em;
21		margin-bottom: 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. */
25tbody {		border-color: inherit; }
26tr {		border-color: inherit; }
27td {		vertical-align: top;
28		padding-left: 0.2em;
29		padding-right: 0.2em;
30		border-color: inherit; }
31ul, ol, dl {	margin-top: 0em;
32		margin-bottom: 0em; }
33li, dt {	margin-top: 1em; }
34
35.permalink {	border-bottom: thin dotted;
36		color: inherit;
37		font: inherit;
38		text-decoration: inherit; }
39* {		clear: both }
40
41/* Search form and search results. */
42
43fieldset {	border: thin solid silver;
44		border-radius: 1em;
45		text-align: center; }
46input[name=expr] {
47		width: 25%; }
48
49table.results {	margin-top: 1em;
50		margin-left: 2em;
51		font-size: smaller; }
52
53/* Header and footer lines. */
54
55table.head {	width: 100%;
56		border-bottom: 1px dotted #808080;
57		margin-bottom: 1em;
58		font-size: smaller; }
59td.head-vol {	text-align: center; }
60td.head-rtitle {
61		text-align: right; }
62
63table.foot {	width: 100%;
64		border-top: 1px dotted #808080;
65		margin-top: 1em;
66		font-size: smaller; }
67td.foot-os {	text-align: right; }
68
69/* Sections and paragraphs. */
70
71.manual-text {
72		margin-left: 3.8em; }
73.Nd { }
74section.Sh { }
75h1.Sh {		margin-top: 1.2em;
76		margin-bottom: 0.6em;
77		margin-left: -3.2em; }
78section.Ss { }
79h2.Ss {		margin-top: 1.2em;
80		margin-bottom: 0.6em;
81		margin-left: -1.2em;
82		font-size: 105%; }
83.Pp {		margin: 0.6em 0em; }
84.Sx { }
85.Xr { }
86
87/* Displays and lists. */
88
89.Bd { }
90.Bd-indent {	margin-left: 3.8em; }
91
92.Bl-bullet {	list-style-type: disc;
93		padding-left: 1em; }
94.Bl-bullet > li { }
95.Bl-dash {	list-style-type: none;
96		padding-left: 0em; }
97.Bl-dash > li:before {
98		content: "\2014  "; }
99.Bl-item {	list-style-type: none;
100		padding-left: 0em; }
101.Bl-item > li { }
102.Bl-compact > li {
103		margin-top: 0em; }
104
105.Bl-enum {	padding-left: 2em; }
106.Bl-enum > li { }
107.Bl-compact > li {
108		margin-top: 0em; }
109
110.Bl-diag { }
111.Bl-diag > dt {
112		font-style: normal;
113		font-weight: bold; }
114.Bl-diag > dd {
115		margin-left: 0em; }
116.Bl-hang { }
117.Bl-hang > dt { }
118.Bl-hang > dd {
119		margin-left: 5.5em; }
120.Bl-inset { }
121.Bl-inset > dt { }
122.Bl-inset > dd {
123		margin-left: 0em; }
124.Bl-ohang { }
125.Bl-ohang > dt { }
126.Bl-ohang > dd {
127		margin-left: 0em; }
128.Bl-tag {	margin-top: 0.6em;
129		margin-left: 5.5em; }
130.Bl-tag > dt {
131		float: left;
132		margin-top: 0em;
133		margin-left: -5.5em;
134		padding-right: 0.5em;
135		vertical-align: top; }
136.Bl-tag > dd {
137		clear: right;
138		width: 100%;
139		margin-top: 0em;
140		margin-left: 0em;
141		margin-bottom: 0.6em;
142		vertical-align: top;
143		overflow: auto; }
144.Bl-compact {	margin-top: 0em; }
145.Bl-compact > dd {
146		margin-bottom: 0em; }
147.Bl-compact > dt {
148		margin-top: 0em; }
149
150.Bl-column { }
151.Bl-column > tbody > tr { }
152.Bl-column > tbody > tr > td {
153		margin-top: 1em; }
154.Bl-compact > tbody > tr > td {
155		margin-top: 0em; }
156
157.Rs {		font-style: normal;
158		font-weight: normal; }
159.RsA { }
160.RsB {		font-style: italic;
161		font-weight: normal; }
162.RsC { }
163.RsD { }
164.RsI {		font-style: italic;
165		font-weight: normal; }
166.RsJ {		font-style: italic;
167		font-weight: normal; }
168.RsN { }
169.RsO { }
170.RsP { }
171.RsQ { }
172.RsR { }
173.RsT {		text-decoration: underline; }
174.RsU { }
175.RsV { }
176
177.eqn { }
178.tbl td {	vertical-align: middle; }
179
180.HP {		margin-left: 3.8em;
181		text-indent: -3.8em; }
182
183/* Semantic markup for command line utilities. */
184
185table.Nm { }
186code.Nm {	font-style: normal;
187		font-weight: bold;
188		font-family: inherit; }
189.Fl {		font-style: normal;
190		font-weight: bold;
191		font-family: inherit; }
192.Cm {		font-style: normal;
193		font-weight: bold;
194		font-family: inherit; }
195.Ar {		font-style: italic;
196		font-weight: normal; }
197.Op {		display: inline; }
198.Ic {		font-style: normal;
199		font-weight: bold;
200		font-family: inherit; }
201.Ev {		font-style: normal;
202		font-weight: normal;
203		font-family: monospace; }
204.Pa {		font-style: italic;
205		font-weight: normal; }
206
207/* Semantic markup for function libraries. */
208
209.Lb { }
210code.In {	font-style: normal;
211		font-weight: bold;
212		font-family: inherit; }
213a.In { }
214.Fd {		font-style: normal;
215		font-weight: bold;
216		font-family: inherit; }
217.Ft {		font-style: italic;
218		font-weight: normal; }
219.Fn {		font-style: normal;
220		font-weight: bold;
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;
229		font-weight: normal;
230		font-family: monospace; }
231.Er {		font-style: normal;
232		font-weight: normal;
233		font-family: monospace; }
234
235/* Various semantic markup. */
236
237.An { }
238.Lk { }
239.Mt { }
240.Cd {		font-style: normal;
241		font-weight: bold;
242		font-family: inherit; }
243.Ad {		font-style: italic;
244		font-weight: normal; }
245.Ms {		font-style: normal;
246		font-weight: bold; }
247.St { }
248.Ux { }
249
250/* Physical markup. */
251
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;
258		font-weight: bold; }
259.Li {		font-style: normal;
260		font-weight: normal;
261		font-family: monospace; }
262
263/* Tooltip support. */
264
265h1.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; }
271
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"; }
286code.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"; }
292code.Nm::before { content: "Nm"; }
293.Pa::before {	content: "Pa"; }
294.Rs::before {	content: "Rs"; }
295h1.Sh::before {	content: "Sh"; }
296h2.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"; }
303
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,
310h1.Sh::before, h2.Ss::before, .St::before, .Sx::before, .Sy::before,
311.Va::before, .Vt::before, .Xr::before {
312		opacity: 0;
313		transition: .15s ease opacity;
314		pointer-events: none;
315		position: absolute;
316		bottom: 100%;
317		box-shadow: 0 0 .35em var(--fg);
318		padding: .15em .25em;
319		white-space: nowrap;
320		font-family: Helvetica,Arial,sans-serif;
321		font-style: normal;
322		font-weight: bold;
323		background: var(--bg);
324		color: var(--fg); }
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,
333.Xr:hover::before {
334		opacity: 1;
335		pointer-events: inherit; }
336
337/* Overrides to avoid excessive margins on small devices. */
338
339@media (max-width: 37.5em) {
340.manual-text {
341		margin-left: 0.5em; }
342h1.Sh, h2.Ss {	margin-left: 0em; }
343.Bd-indent {	margin-left: 2em; }
344.Bl-hang > dd {
345		margin-left: 2em; }
346.Bl-tag {	margin-left: 2em; }
347.Bl-tag > dt {
348		margin-left: -2em; }
349.HP {		margin-left: 2em;
350		text-indent: -2em; }
351}
352
353/* Overrides for a dark color scheme for accessibility. */
354
355@media (prefers-color-scheme: dark) {
356html {		--bg: #1E1F21;
357		--fg: #EEEFF1; }
358:link {		color: #BAD7FF; }
359:visited {	color: #F6BAFF; }
360}
361