Skip to content

Block Grid not aligning correctly with grid-margin-x in 6.4.3 #11121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lrobson555 opened this issue Apr 3, 2018 · 4 comments
Closed

Block Grid not aligning correctly with grid-margin-x in 6.4.3 #11121

lrobson555 opened this issue Apr 3, 2018 · 4 comments

Comments

@lrobson555
Copy link

lrobson555 commented Apr 3, 2018

How to reproduce this bug:

  1. Create a block grid that only uses small-up-3, no medium or large classes, with grid-margin-x

What should happen:

Three columns should be displayed in a row with margins between.

What happened instead:

Only two columns are displayed in a row.
Looks like when calculating the width of each column using the percentage minus the margin, it's only taking into account a 20px margin instead of 30px.

Browser(s) and Device(s) tested on:

Chrome v 65.0.3325.181, macOS Sierra 10.12.6

Foundation Version(s) you are using:

Broken on 6.4.3, seems to work fine in 6.4.0.

Test case link:

Broken in first, works in second:

@DanielRuf
Copy link
Contributor

DanielRuf commented Apr 8, 2018

The bug was introduced between 6.4.1 and 6.4.2-rc1.

Will do some bisecting.

@DanielRuf
Copy link
Contributor

DanielRuf commented Apr 8, 2018

$ git bisect bad
8a0ae1958a58a084e6fe0049482df483ce7a8b3c is the first bad commit
commit 8a0ae1958a58a084e6fe0049482df483ce7a8b3c
Author: Kevin Ball <[email protected]>
Date:   Fri Jul 21 08:37:21 2017 -0700

    Merge pull request #10435 from zurb/xy-grid-layout-fix

    Add missing arguement for xy-grid-layout mixin

:040000 040000 7a37fc20973f7df6a5e3f83c089016c355353544 26fb8348cbcedb0ef5d783bb3bc5913fc2eef8d0 M      scss

Daniel@Daniel-MSI MINGW64 ~/GITHUB/foundation-sites ((8a0ae1958...)|BISECTING)
$ git show 8a0ae1958a58a084e6fe0049482df483ce7a8b3c
commit 8a0ae1958a58a084e6fe0049482df483ce7a8b3c (HEAD, refs/bisect/bad)
Author: Kevin Ball <[email protected]>
Date:   Fri Jul 21 08:37:21 2017 -0700

    Merge pull request #10435 from zurb/xy-grid-layout-fix

    Add missing arguement for xy-grid-layout mixin

diff --git a/scss/xy-grid/_layout.scss b/scss/xy-grid/_layout.scss
index bd8c14284..3b7650e32 100644
--- a/scss/xy-grid/_layout.scss
+++ b/scss/xy-grid/_layout.scss
@@ -28,6 +28,6 @@
   $size: percentage(1/$n);

   & > #{$selector} {
-    @include xy-cell($size, $gutter-output, $gutter-type: $gutter-type, $gutter-position: $gutter-position, $vertical: $vertical);
+    @include xy-cell($size, $gutter-output, $gutters, $gutter-type, $gutter-position, $breakpoint, $vertical);
   }
 }

8a0ae19

@DanielRuf
Copy link
Contributor

The mixin has following arguments

@mixin xy-cell(
  $size: full,
  $gutter-output: true,
  $gutters: $grid-margin-gutters,
  $gutter-type: margin,
  $gutter-position: right left,
  $breakpoint: null,
  $vertical: false
) {

@DanielRuf
Copy link
Contributor

Please test the linked PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants