]> git.ipfire.org Git - thirdparty/foundation/foundation-emails.git/commitdiff
Fix min-width calculation for center tags. Fixes bug #185
authorKevin Ball <kmball11@gmail.com>
Mon, 21 Mar 2016 23:45:47 +0000 (16:45 -0700)
committerKevin Ball <kmball11@gmail.com>
Mon, 21 Mar 2016 23:45:52 +0000 (16:45 -0700)
scss/grid/_grid.scss
test/visual/pages/center-width.html [new file with mode: 0644]

index 324805e594938e765af06c0e1816bb6fb640f7bc..1fe6e2af40f0c5e23573853deb3336dd326702e7 100755 (executable)
@@ -113,7 +113,7 @@ th.column {
 @for $i from 1 through $grid-column-count {
   td.large-#{$i} center,
   th.large-#{$i} center {
-    min-width: -zf-grid-calc-px($i, $grid-column-count, $global-width);
+    min-width: -zf-grid-calc-px($i, $grid-column-count, $global-width) - ($global-gutter * 2);
   }
 }
 
diff --git a/test/visual/pages/center-width.html b/test/visual/pages/center-width.html
new file mode 100644 (file)
index 0000000..87d3c27
--- /dev/null
@@ -0,0 +1,29 @@
+<!-- From https://github.com/zurb/foundation-emails/issues/185 -->
+<table class="container">
+  <tbody><tr>
+    <td>
+      <table class="row ">
+      <tbody><tr class="">
+        <th class="columns first last small-12 large-12 ">
+            <center>
+            <p class="text-center">
+              Sample text
+            </p>
+            </center>
+        </th>
+      </tr>
+      </tbody></table>
+      <table class="row collapse">
+      <tbody><tr class="">
+        <th class="columns first last small-12 large-12 ">
+            <center>
+            <p class="text-center">
+              Sample text
+            </p>
+            </center>
+        </th>
+      </tr>
+      </tbody></table>
+    </td>
+  </tr></tbody>
+</table>