]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/notifier/_message_body.html.erb
Set image dimensions in order to avoid a reflow after the page is drawn by the browser
[rails.git] / app / views / notifier / _message_body.html.erb
index 485cd3c445d7f41dfe5248df9888dbf56cc0f0ed..29bd3e06372f2177af38f13e53da47f8b5c33f95 100644 (file)
@@ -1,20 +1,20 @@
-<table style="font-size: 15px; margin: 15px 0px; background-color: #eee; max-width: 565px">
+<table style="font-size: 15px; margin: 15px 0px; background-color: #eee; width: 100%">
   <tr>
-    <td style="width: 50px; vertical-align: top; padding: 15px">
+    <td style="width: 50px; min-width: 50px; vertical-align: top; padding: 15px">
       <%= link_to(
-          image_tag(
-            attachments["avatar.png"].url,
-            alt: @author,
-            title: @author,
-            width: 50,
-            height: 50,
-            border: 0
-          ),
-          user_url(@author, :host => SERVER_URL),
-          :target => "_blank"
-      ) %>
+            image_tag(
+              attachments["avatar.png"].url,
+              :alt => @author,
+              :title => @author,
+              :width => 50,
+              :height => 50,
+              :border => 0
+            ),
+            user_url(@author),
+            :target => "_blank"
+          ) %>
     </td>
-    <td style="text-align: left; vertical-align: top; padding-right: 10px; max-width: 550px">
+    <td style="text-align: left; vertical-align: top; padding-right: 10px; width: 100%">
       <%= body %>
     </td>
   </tr>