Skip to content

Commit

Permalink
Fixes dark mode for HTML email reports on iOS Mail. (#778)
Browse files Browse the repository at this point in the history
* Fixes dark mode on iOS.

In particular, the unified diff view is now more readable.
  • Loading branch information
trevorshannon authored Dec 3, 2023
1 parent d1fe95b commit 204672f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/urlwatch/reporters.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,10 @@ def _parts(self):
<title>urlwatch</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="color-scheme" content="light dark">
<meta name="supported-color-schemes" content="light dark only">
<style type="text/css">
:root { color-scheme: light dark; supported-color-schemes: light dark; }
body { font-family: sans-serif; }
.diff_add { background-color: #abf2bc; display: inline-block; }
.diff_sub { background-color: #ffd7d5; display: inline-block; }
Expand All @@ -207,6 +210,7 @@ def _parts(self):
.diff_add { background-color: #1c4329; }
.diff_sub { background-color: #542527; }
.diff_chg { background-color: #907709; }
.unified_nor { color: #ddd; }
}
</style>
</head><body>
Expand Down

0 comments on commit 204672f

Please sign in to comment.