From 878caeb06dbc0b89f14b3a432496ac11d5238495 Mon Sep 17 00:00:00 2001 From: Henriette Dinger Date: Tue, 27 Aug 2019 14:46:26 +0200 Subject: [PATCH] Explicitly set colors for mails in MacOS dark mode --- app/views/layouts/project_mailer.html.erb | 11 ++++++++++- app/views/layouts/user_mailer.html.erb | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/project_mailer.html.erb b/app/views/layouts/project_mailer.html.erb index 521d936bee..2458caff89 100644 --- a/app/views/layouts/project_mailer.html.erb +++ b/app/views/layouts/project_mailer.html.erb @@ -32,8 +32,17 @@ See docs/COPYRIGHT.rdoc for more details. body { font-family: Verdana, sans-serif; font-size: 0.8em; - color:#484848; + color: #484848; + background: #FFFFFF; } + + @media (prefers-color-scheme: dark) { + body { + color: #CCC; + background: #222222; + } + } + h1, h2, h3 { font-family: "Trebuchet MS", Verdana, sans-serif; margin: 0px; } h1 { font-size: 1.2em; } h2, h3 { font-size: 1.1em; } diff --git a/app/views/layouts/user_mailer.html.erb b/app/views/layouts/user_mailer.html.erb index 91589ec9ab..a4bdad533e 100644 --- a/app/views/layouts/user_mailer.html.erb +++ b/app/views/layouts/user_mailer.html.erb @@ -32,8 +32,17 @@ See docs/COPYRIGHT.rdoc for more details. body { font-family: Verdana, sans-serif; font-size: 0.8em; - color:#484848; + color: #484848; + background: #FFFFFF; } + + @media (prefers-color-scheme: dark) { + body { + color: #CCC; + background: #222222; + } + } + h1, h2, h3 { font-family: "Trebuchet MS", Verdana, sans-serif; margin: 0px; } h1 { font-size: 1.2em; } h2, h3 { font-size: 1.1em; }