]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commit
fix: fix cell widths overridden by readjusted smaller breakpoints in XY Grid #10468 11117/head
authorNicolas Coden <nicolas@ncoden.fr>
Sun, 1 Apr 2018 21:30:26 +0000 (23:30 +0200)
committerNicolas Coden <nicolas@ncoden.fr>
Sun, 1 Apr 2018 21:30:26 +0000 (23:30 +0200)
commit2b5aaa7e60a209931f041a0d530fc184f3033dc4
tree5bb299a3796d29e1d74ed9f83326b0f6f9c92dfd
parent78bda6170adddb29634e97641ade6894b8fe4ed8
fix: fix cell widths overridden by readjusted smaller breakpoints in XY Grid #10468

With margin gutters, a cell width is defined with its gutter. This is why we have to readjust all sizes and not only `.cell` when applying the new gutter in a bigger breakpoint. This must include all sizes for smaller breakpoints too.

Before this commit there was an optimization that prevent gutters for smaller breakpoints without a new gutter defined to be regenerated. This can seems logical since no gutter was generated for this breakpoint so there is nothing to readjust.

However, because the gutter is defined _with the width/height_, the readjusted width/height of readjusted gutters (with a custom gutter) overrides the width/height of bigger non-readjusted (without a custom gutter) breakpoint.

Changes:
* Readjust gutters for all breakpoints even without new gutter defined
* Add explainaitions

Closes https://github.com/zurb/foundation-sites/issues/10468
scss/xy-grid/_classes.scss