]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
fix: add missing flex reset in XY Grid responsive vertical cell widths 11397/head
authorNicolas Coden <nicolas@ncoden.fr>
Tue, 10 Jul 2018 18:52:57 +0000 (20:52 +0200)
committerNicolas Coden <nicolas@ncoden.fr>
Tue, 10 Jul 2018 18:52:57 +0000 (20:52 +0200)
Apply #10891 with optimizations introduced by 7e34dc3b5 to vertical cells.

See https://github.com/zurb/foundation-sites/issues/10891

scss/xy-grid/_classes.scss

index fddf6b0de1d8ad796f70190e183e1f7da5994871..eccf9986a7547ee71f68f3ccbfb4a94e178fcb92 100644 (file)
       }
     }
 
-    %-xy-cell-base-shrink-#{$-zf-size} {
+    %-xy-cell-base-shrink-horizontal-#{$-zf-size} {
       @include xy-cell-base(shrink);
     }
 
     // Responsive "shrink" modifier
     @if not($-zf-size == small) {
       .grid-x > .#{$-zf-size}-shrink {
-        @extend %-xy-cell-base-shrink-#{$-zf-size};
+        @extend %-xy-cell-base-shrink-horizontal-#{$-zf-size};
         @include xy-cell-static(shrink, false);
       }
     }
@@ -92,7 +92,7 @@
     @for $i from 1 through $grid-columns {
       // Sizing (percentage)
       .grid-x > .#{$-zf-size}-#{$i} {
-        @extend %-xy-cell-base-shrink-#{$-zf-size};
+        @extend %-xy-cell-base-shrink-horizontal-#{$-zf-size};
         @include xy-cell-static($i, false, $gutter-type: padding);
       }
     }
     }
 
     @include -zf-each-breakpoint() {
+      // Responsive "auto" modifier
       @if not($-zf-size == small) {
         > .#{$-zf-size}-auto {
           @include xy-cell-base(auto);
           @include xy-cell-static(auto, false, $breakpoint: $-zf-size, $vertical: true);
         }
+      }
+
+      %-xy-cell-base-shrink-vertical-#{$-zf-size} {
+        @include xy-cell-base(shrink);
+      }
 
+      // Responsive "shrink" modifier
+      @if not($-zf-size == small) {
         > .#{$-zf-size}-shrink {
+          @extend %-xy-cell-base-shrink-vertical-#{$-zf-size};
           @include xy-cell-static(shrink, false, $breakpoint: $-zf-size, $vertical: true);
         }
-
       }
 
+      // Responsive width modifiers
       @for $i from 1 through $grid-columns {
         // Sizing (percentage)
         > .#{$-zf-size}-#{$i} {
+          @extend %-xy-cell-base-shrink-vertical-#{$-zf-size};
           @include xy-cell-static($i, false, $vertical: true, $gutter-type: padding);
         }
       }