summaryrefslogtreecommitdiffstats
path: root/mandoc.css
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2019-06-02 16:57:13 +0000
committerIngo Schwarze <schwarze@openbsd.org>2019-06-02 16:57:13 +0000
commit6c467e8e8685ea6c34efbf37519b8d5adfb3ff59 (patch)
tree3455d8b288f19788e0c130f3535a7d54a4ef88bd /mandoc.css
parent3458ed8c20710f425a0392740d698abcc15ba049 (diff)
downloadmandoc-6c467e8e8685ea6c34efbf37519b8d5adfb3ff59.tar.gz
Support prefers-color-scheme: dark.
The :visited rule was contributed by <Armin at Besirovic dot com>. Guidance and OK tj@.
Diffstat (limited to 'mandoc.css')
-rw-r--r--mandoc.css27
1 files changed, 20 insertions, 7 deletions
diff --git a/mandoc.css b/mandoc.css
index c6dc7990..d878b1fd 100644
--- a/mandoc.css
+++ b/mandoc.css
@@ -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; }
@@ -69,8 +74,7 @@ td.foot-os { text-align: right; }
section.Sh { }
h1.Sh { margin-top: 1.2em;
margin-bottom: 0.6em;
- margin-left: -3.2em;
- font-size: 110%; }
+ margin-left: -3.2em; }
section.Ss { }
h2.Ss { margin-top: 1.2em;
margin-bottom: 0.6em;
@@ -310,14 +314,14 @@ h1.Sh::before, h2.Ss::before, .St::before, .Sx::before, .Sy::before,
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,
@@ -345,3 +349,12 @@ h1.Sh, h2.Ss { margin-left: 0em; }
.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; }
+}