mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FEATURE: Enables support for dark mode emails (#16520)
This PR enables custom email dark mode styles by default that were added here.
There is currently poor support for dark mode queries in mail clients. The main beneficiary of these changes will be Apple Mail and Outlook.
Enjoy the darkness 🕶️
This commit is contained in:
@ -72,7 +72,7 @@ describe EmailStyle do
|
||||
SiteSetting.default_email_in_reply_to = true
|
||||
|
||||
expect(mail_html.scan('<h1 style="color: red;">FOR YOU</h1>').count).to eq(1)
|
||||
matches = mail_html.match(/<div style="([^"]+)">#{post.raw}/)
|
||||
matches = mail_html.match(/<div style="([^"]+)" dm=\"body\">#{post.raw}/)
|
||||
expect(matches[1]).to include('color: #FAB;') # custom
|
||||
expect(matches[1]).to include('padding-top:5px;') # div.body
|
||||
end
|
||||
|
Reference in New Issue
Block a user