From: harry Date: Fri, 24 Feb 2017 01:59:17 +0000 (+0530) Subject: Optional Responsive breakpoints for sizing classes! X-Git-Tag: v6.4.0-rc1~23^2~20^2~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=446e5e47bf61c3da334cf3bcd0d24ac367a3efc6;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Optional Responsive breakpoints for sizing classes! --- diff --git a/scss/prototype/_sizing.scss b/scss/prototype/_sizing.scss index 31345f84a..56061c758 100644 --- a/scss/prototype/_sizing.scss +++ b/scss/prototype/_sizing.scss @@ -6,6 +6,10 @@ /// @group prototype-sizing //// +/// Responsive breakpoints for spacing classes (margin and padding) +/// @type Boolean +$prototype-sizing-breakpoints: $global-prototype-breakpoints !default; + /// Map containing all the `sizing` classes /// @type Map $prototype-sizing: ( @@ -34,8 +38,8 @@ $prototype-sizes: ( @mixin foundation-prototype-sizing { // Element Sizing @each $sizing in $prototype-sizing { - @each $size, $percentage in $prototype-sizes { - .#{$sizing}-#{$size} { + @each $length, $percentage in $prototype-sizes { + .#{$sizing}-#{$length} { #{$sizing}: $percentage !important; } } @@ -48,4 +52,21 @@ $prototype-sizes: ( .max-height-100 { @include max-height-100; } + + @if ($prototype-sizing-breakpoints) { + // Loop through Responsive Breakpoints + @each $size in $breakpoint-classes { + @include breakpoint($size) { + @if $size != $-zf-zero-breakpoint { + @each $sizing in $prototype-sizing { + @each $length, $percentage in $prototype-sizes { + .#{$size}-#{$sizing}-#{$length} { + #{$sizing}: $percentage !important; + } + } + } + } + } + } + } }