From f7d661380d8887e8957463d3094258cdc82b3552 Mon Sep 17 00:00:00 2001 From: Nicolas Coden Date: Sun, 25 Dec 2016 23:26:47 +0100 Subject: [PATCH] Fix size of row nested inside collapsed (flex-)grid row. See: https://github.com/zurb/foundation-sites/issues/9557 Problem: Every row has a max width, so when nested, it cannot be enlarged with negative margins to handle the paddings of its columns. Fix: expand the size of all row nested in a non-expanded row. Note: THIS IS A TEMPORARY FIX. Grids and flex-grids have a lot of bugs like this one and should be refactorized. Please beat me if you see this commit 6 months later and nothing changed. --- scss/grid/_classes.scss | 4 ++++ scss/grid/_flex-grid.scss | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/scss/grid/_classes.scss b/scss/grid/_classes.scss index 7791e12d0..d2f5c51e1 100644 --- a/scss/grid/_classes.scss +++ b/scss/grid/_classes.scss @@ -55,6 +55,10 @@ } } + &:not(.#{$expanded}) .#{$row} { + @include grid-row-size(expand); + } + @if type-of($grid-column-gutter) == 'map' { // Static (unresponsive) row gutters // diff --git a/scss/grid/_flex-grid.scss b/scss/grid/_flex-grid.scss index 88cadd3a1..f0471d064 100644 --- a/scss/grid/_flex-grid.scss +++ b/scss/grid/_flex-grid.scss @@ -141,6 +141,10 @@ @include grid-row-size(expand); } + &:not(.expanded) .row { + @include grid-row-size(expand); + } + &.collapse { > .column { @include grid-col-collapse; -- 2.47.2