From: Tvrtko Date: Tue, 15 Dec 2015 19:03:17 +0000 (+0100) Subject: #7502 - generate stacked-for- classes for each screen size (in $breakpoint-classes... X-Git-Tag: v6.0.6~6^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26d93b67503d46aec554b94e7c576e28e1b7f7f8;p=thirdparty%2Ffoundation%2Ffoundation-sites.git #7502 - generate stacked-for- classes for each screen size (in $breakpoint-classes var) default behaviour is stacking sections on small screens only. --- diff --git a/scss/components/_top-bar.scss b/scss/components/_top-bar.scss index 4ee45a7d8..2ef91bf63 100644 --- a/scss/components/_top-bar.scss +++ b/scss/components/_top-bar.scss @@ -48,6 +48,7 @@ $topbar-input-width: 200px !default; /// makes sections stacked @mixin top-bar-stacked() { + // Sub-sections .top-bar-right { width: 100%; } @@ -56,35 +57,22 @@ $topbar-input-width: 200px !default; } } -/// unstack sections -@mixin top-bar-unstack() { - .top-bar-right { - width: auto; - } - .top-bar-left { - width: auto; - } -} @mixin foundation-top-bar { // Top bar container .top-bar { @include top-bar-container; } - // Stack on medium screens smaller - .stacked-for-medium { - @include breakpoint(medium down) { - @include top-bar-stacked; + // generate classes for stacking on each screen size (defined in $breakpoint-classes) + @each $size in $breakpoint-classes { + .stacked-for-#{$size} { + @include breakpoint($size down) { + @include top-bar-stacked; + } } } - // Stack on small screens - .stacked, - .stacked-for-small { - @include breakpoint(small) { - @include top-bar-stacked; - } - @include breakpoint(medium) { - @include top-bar-unstack; - } + // stack on small screens as default + @include breakpoint(small down) { + @include top-bar-stacked; } // Sub-sections