From: Kevin Ball Date: Fri, 26 May 2017 20:06:11 +0000 (-0700) Subject: Checkpoint progress X-Git-Tag: v6.4.0-rc1~9^2~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d34cdc296de14e39f663df9a0ec35d5f99f70c0;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Checkpoint progress --- diff --git a/scss/util/_breakpoint.scss b/scss/util/_breakpoint.scss index 166d973e0..4dbe12aae 100644 --- a/scss/util/_breakpoint.scss +++ b/scss/util/_breakpoint.scss @@ -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; diff --git a/scss/zf-grid/_cell.scss b/scss/zf-grid/_cell.scss index 049f83d67..622b1a304 100644 --- a/scss/zf-grid/_cell.scss +++ b/scss/zf-grid/_cell.scss @@ -42,6 +42,23 @@ @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') { @@ -53,19 +70,16 @@ } } } @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); } } } diff --git a/scss/zf-grid/_classes.scss b/scss/zf-grid/_classes.scss index 8b7b78111..6f680a65b 100644 --- a/scss/zf-grid/_classes.scss +++ b/scss/zf-grid/_classes.scss @@ -174,10 +174,10 @@ @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