]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Checkpoint progress
authorKevin Ball <kmball11@gmail.com>
Fri, 26 May 2017 20:06:11 +0000 (13:06 -0700)
committerKevin Ball <kmball11@gmail.com>
Fri, 26 May 2017 20:06:11 +0000 (13:06 -0700)
scss/util/_breakpoint.scss
scss/zf-grid/_cell.scss
scss/zf-grid/_classes.scss

index 166d973e0d2655bdb2ce567712e8a6a805831921..4dbe12aaebe055479736f0e2c2a72bb20cce7804 100644 (file)
@@ -211,27 +211,27 @@ $breakpoint-classes: (small medium large) !default;
 
 }
 
-/// Return a list of our named breakpoints starting from one in particular
+/// Return a list of our named breakpoints greater than $key
 /// @access private
 ///
 /// @param {String} $key - Key to use as a starting point.
 ///
-/// @returns {Array} The list of breakpoints greater or equal to $key. If $key is auto, returns entire list
-@function -zf-breakpoints-up-from($key) {
+/// @returns {Array} The list of breakpoints greater than $key. If $key is auto, returns breakpoints above the zero
+@function -zf-breakpoints-above($key) {
   $list: ();
   $found_key: false;
 
   @if ($key == 'auto') {
-    $list: $-zf-breakpoints-keys;
+    $list: -zf-breakpoints-above($-zf-zero-breakpoint);
   }
   @else {
     @each $name in $-zf-breakpoints-keys {
-      @if ($name == $key) {
-        $found_key: true;
-      }
       @if ($found_key) {
         $list: append($list, $name);
       }
+      @if ($name == $key) {
+        $found_key: true;
+      }
     }
   }
   @return $list;
index 049f83d67019f350b6c203bcc8329ea9dff69add..622b1a304ab707d94ada932df7663ba6ffca1a3a 100644 (file)
   @return $size;
 }
 
+@mixin -zf-cell-margin-inner($size, $direction, $gutters, $breakpoint) {
+  @include breakpoint($breakpoint) {
+    @include -zf-breakpoint-value($breakpoint, $gutters) {
+      $gutter: rem-calc($-zf-bp-value);
+      @if($size == 'shrink'){
+        flex: 0 0 auto;
+        max-#{$direction}: calc(100% - #{$gutter});
+      } @elseif($size == 'full') {
+        flex: 1 1 calc(100% - #{$gutter});
+      } @else {
+        flex: 0 0 calc(#{zf-cell-size($size)} - #{$gutter});
+        max-#{$direction}: calc(#{zf-cell-size($size)} - #{$gutter});
+      }
+    }
+  }
+}
+
 @mixin -zf-cell-margin($size, $gutters, $gutter-position, $vertical, $breakpoint) {
   $direction: if($vertical == true, height, width);
   @if($size == 'auto') {
       }
     }
   } @else {
-    @each $bp in -zf-breakpoints-up-from($breakpoint) {
-      @include breakpoint($bp) {
-        @include -zf-breakpoint-value($bp, $gutters) {
-          $gutter: rem-calc($-zf-bp-value);
-          @if($size == 'shrink'){
-            flex: 0 0 auto;
-            max-#{$direction}: calc(100% - #{$gutter});
-          } @elseif($size == 'full') {
-            flex: 1 1 calc(100% - #{$gutter});
-          } @else {
-            flex: 0 0 calc(#{zf-cell-size($size)} - #{$gutter});
-            max-#{$direction}: calc(#{zf-cell-size($size)} - #{$gutter});
-          }
+    @if($breakpoint == auto) {
+      $breakpoint: $-zf-zero-breakpoint;
+    }
+    @debug 'default setting ' + $size + ' inner for breakpoint ' + $breakpoint;
+    @include -zf-cell-margin-inner($size, $direction, $gutters, $breakpoint);
+    @each $bp in -zf-breakpoints-above($breakpoint) {
+      @if(type-of($gutters) == 'map') {
+        @if map-has-key($gutters, $bp) {
+          @debug 'inside loop setting ' + $size + ' inner for breakpoint ' + $bp;
+          @include -zf-cell-margin-inner($size, $direction, $gutters, $bp);
         }
       }
     }
index 8b7b781119fe7aa9042e11e5942366d59f9a281c..6f680a65b45477bb648481ff16b992f24bb9c3f5 100644 (file)
 @mixin foundation-zf-grid-classes(
   $base-grid: true,
   $margin-grid: true,
-  $padding-grid: true,
-  $vertical-grid: true,
-  $collapse: true,
-  $offset: true
+  $padding-grid: false,
+  $vertical-grid: false,
+  $collapse: false,
+  $offset: false
 ) {
 
   // Base grid styles