aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-04-27 09:38:14 +0200
committerYves Senn <yves.senn@gmail.com>2015-04-28 16:00:07 +0200
commitd704f8f808210171964d1822d5ffd6b227b702b2 (patch)
treefad7b3c802f8ec0383a32b45c60e6ed750fb23d5
parent6ccf3bfa6e951fabf75352656a707f3a501b1cc2 (diff)
downloadrails-d704f8f808210171964d1822d5ffd6b227b702b2.tar.gz
rails-d704f8f808210171964d1822d5ffd6b227b702b2.tar.bz2
rails-d704f8f808210171964d1822d5ffd6b227b702b2.zip
mailer previews, make sure labels and values line up.
While this was true before when every `dd` had a value, this patch makes sure that everything keeps lining up even when the `dd` node is blank.
-rw-r--r--actionmailer/CHANGELOG.md4
-rw-r--r--railties/lib/rails/templates/rails/mailers/email.html.erb4
2 files changed, 8 insertions, 0 deletions
diff --git a/actionmailer/CHANGELOG.md b/actionmailer/CHANGELOG.md
index 86ecb3ee88..12867c7c9e 100644
--- a/actionmailer/CHANGELOG.md
+++ b/actionmailer/CHANGELOG.md
@@ -1,3 +1,7 @@
+* Make sure labels and values line up in mailer previews.
+
+ *Yves Senn*
+
* Add `assert_enqueued_emails` and `assert_no_enqueued_emails`.
Example:
diff --git a/railties/lib/rails/templates/rails/mailers/email.html.erb b/railties/lib/rails/templates/rails/mailers/email.html.erb
index 0b08a01896..cce818d103 100644
--- a/railties/lib/rails/templates/rails/mailers/email.html.erb
+++ b/railties/lib/rails/templates/rails/mailers/email.html.erb
@@ -39,6 +39,10 @@
padding: 1px;
}
+ dd:empty:before {
+ content: "\00a0"; // &nbsp;
+ }
+
iframe {
border: 0;
width: 100%;