source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
Subject: mandoc: Support prefers-color-scheme: dark.
Date: Sun, 2 Jun 2019 11:57:43 -0500 (EST)	[thread overview]
Message-ID: <e400776b798dfc25@fantadrom.bsd.lv> (raw)

Log Message:
-----------
Support prefers-color-scheme: dark.
The :visited rule was contributed by <Armin at Besirovic dot com>.
Guidance and OK tj@.

Modified Files:
--------------
    mandoc:
        mandoc.css

Revision Data
-------------
Index: mandoc.css
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mandoc.css,v
retrieving revision 1.45
retrieving revision 1.46
diff -Lmandoc.css -Lmandoc.css -u -p -r1.45 -r1.46
--- mandoc.css
+++ 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::befor
 		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,
@@ -344,4 +348,13 @@ h1.Sh, h2.Ss {	margin-left: 0em; }
 		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; }
 }
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

                 reply	other threads:[~2019-06-02 16:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e400776b798dfc25@fantadrom.bsd.lv \
    --to=schwarze@mandoc.bsd.lv \
    --cc=source@mandoc.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).