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