=================================================================== RCS file: /cvs/mandoc/mandoc.css,v retrieving revision 1.44 retrieving revision 1.49 diff -u -p -r1.44 -r1.49 --- mandoc/mandoc.css 2019/01/11 12:56:43 1.44 +++ mandoc/mandoc.css 2022/03/17 18:45:49 1.49 @@ -1,4 +1,4 @@ -/* $Id: mandoc.css,v 1.44 2019/01/11 12:56:43 schwarze Exp $ */ +/* $Id: mandoc.css,v 1.49 2022/03/17 18:45:49 schwarze Exp $ */ /* * Standard style sheet for mandoc(1) -Thtml and man.cgi(8). * @@ -10,8 +10,13 @@ /* Global defaults. */ -html { max-width: 65em; } -body { font-family: Helvetica,Arial,sans-serif; } +html { max-width: 65em; + --bg: #FFFFFF; + --fg: #000000; } +body { background: var(--bg); + color: var(--fg); + font-family: Helvetica,Arial,sans-serif; } +h1 { font-size: 110%; } table { margin-top: 0em; margin-bottom: 0em; border-collapse: collapse; } @@ -26,6 +31,7 @@ td { vertical-align: top; ul, ol, dl { margin-top: 0em; margin-bottom: 0em; } li, dt { margin-top: 1em; } +pre { font-family: inherit; } .permalink { border-bottom: thin dotted; color: inherit; @@ -66,11 +72,12 @@ td.foot-os { text-align: right; } .manual-text { margin-left: 3.8em; } .Nd { } -.Sh { margin-top: 1.2em; +section.Sh { } +h1.Sh { margin-top: 1.2em; margin-bottom: 0.6em; - margin-left: -3.2em; - font-size: 110%; } -.Ss { margin-top: 1.2em; + margin-left: -3.2em; } +section.Ss { } +h2.Ss { margin-top: 1.2em; margin-bottom: 0.6em; margin-left: -1.2em; font-size: 105%; } @@ -129,12 +136,12 @@ td.foot-os { text-align: right; } vertical-align: top; } .Bl-tag > dd { clear: right; + column-count: 1; /* Force block formatting context. */ width: 100%; margin-top: 0em; margin-left: 0em; margin-bottom: 0.6em; - vertical-align: top; - overflow: auto; } + vertical-align: top; } .Bl-compact { margin-top: 0em; } .Bl-compact > dd { margin-bottom: 0em; } @@ -188,7 +195,7 @@ code.Nm { font-style: normal; font-family: inherit; } .Ar { font-style: italic; font-weight: normal; } -.Op { display: inline; } +.Op { display: inline flow; } .Ic { font-style: normal; font-weight: bold; font-family: inherit; } @@ -243,7 +250,7 @@ a.In { } /* Physical markup. */ -.Bf { display: inline; } +.Bf { display: inline flow; } .No { font-style: normal; font-weight: normal; } .Em { font-style: italic; @@ -256,11 +263,11 @@ a.In { } /* Tooltip support. */ -.Sh, .Ss { position: relative; } +h1.Sh, h2.Ss { position: relative; } .An, .Ar, .Cd, .Cm, .Dv, .Em, .Er, .Ev, .Fa, .Fd, .Fl, .Fn, .Ft, .Ic, code.In, .Lb, .Lk, .Ms, .Mt, .Nd, code.Nm, .Pa, .Rs, .St, .Sx, .Sy, .Va, .Vt, .Xr { - display: inline-block; + display: inline flow; position: relative; } .An::before { content: "An"; } @@ -286,8 +293,8 @@ code.In::before { content: "In"; } code.Nm::before { content: "Nm"; } .Pa::before { content: "Pa"; } .Rs::before { content: "Rs"; } -.Sh::before { content: "Sh"; } -.Ss::before { content: "Ss"; } +h1.Sh::before { content: "Sh"; } +h2.Ss::before { content: "Ss"; } .St::before { content: "St"; } .Sx::before { content: "Sx"; } .Sy::before { content: "Sy"; } @@ -301,28 +308,28 @@ code.Nm::before { content: "Nm"; } .Ic::before, code.In::before, .Lb::before, .Lk::before, .Ms::before, .Mt::before, .Nd::before, code.Nm::before, .Pa::before, .Rs::before, -.Sh::before, .Ss::before, .St::before, .Sx::before, .Sy::before, +h1.Sh::before, h2.Ss::before, .St::before, .Sx::before, .Sy::before, .Va::before, .Vt::before, .Xr::before { opacity: 0; transition: .15s ease opacity; pointer-events: none; position: absolute; bottom: 100%; - box-shadow: 0 0 .35em #000; + box-shadow: 0 0 .35em var(--fg); padding: .15em .25em; white-space: nowrap; font-family: Helvetica,Arial,sans-serif; font-style: normal; font-weight: bold; - color: black; - background: #fff; } + background: var(--bg); + color: var(--fg); } .An:hover::before, .Ar:hover::before, .Cd:hover::before, .Cm:hover::before, .Dv:hover::before, .Em:hover::before, .Er:hover::before, .Ev:hover::before, .Fa:hover::before, .Fd:hover::before, .Fl:hover::before, .Fn:hover::before, .Ft:hover::before, .Ic:hover::before, code.In:hover::before, .Lb:hover::before, .Lk:hover::before, .Ms:hover::before, .Mt:hover::before, .Nd:hover::before, code.Nm:hover::before, .Pa:hover::before, -.Rs:hover::before, .Sh:hover::before, .Ss:hover::before, .St:hover::before, +.Rs:hover::before, h1.Sh:hover::before, h2.Ss:hover::before, .St:hover::before, .Sx:hover::before, .Sy:hover::before, .Va:hover::before, .Vt:hover::before, .Xr:hover::before { opacity: 1; @@ -333,7 +340,7 @@ code.Nm::before { content: "Nm"; } @media (max-width: 37.5em) { .manual-text { margin-left: 0.5em; } -.Sh, .Ss { margin-left: 0em; } +h1.Sh, h2.Ss { margin-left: 0em; } .Bd-indent { margin-left: 2em; } .Bl-hang > dd { margin-left: 2em; } @@ -342,4 +349,13 @@ code.Nm::before { content: "Nm"; } margin-left: -2em; } .HP { margin-left: 2em; text-indent: -2em; } +} + +/* Overrides for a dark color scheme for accessibility. */ + +@media (prefers-color-scheme: dark) { +html { --bg: #1E1F21; + --fg: #EEEFF1; } +:link { color: #BAD7FF; } +:visited { color: #F6BAFF; } }