From e2ce4947d7990d645052613c9ab3e4bab794d741 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Tue, 11 Jun 2013 12:28:50 -0400 Subject: [PATCH] Adds `max-width` to images in digest emails. --- lib/email/styles.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/email/styles.rb b/lib/email/styles.rb index c154abb3a5b..f9f466c3ffb 100644 --- a/lib/email/styles.rb +++ b/lib/email/styles.rb @@ -20,6 +20,10 @@ module Email hr['style'] = 'background-color: #ddd; height: 1px; border: 1px;' end + fragment.css('img').each do |img| + img['style'] = "max-width: 694px;" + end + fragment.css('a').each do |a| a['style'] = 'text-decoration: none; font-weight: bold; font-size: 15px; color: #006699;' end