/// @type Number
$topbar-input-width: 200px !default;
+/// Breakpoint at which top bar switches from mobile to desktop view.
+$topbar-unstack-breakpoint: medium !default;
+
/// Adds styles for a top bar container.
@mixin top-bar-container {
@if $global-flexbox {
background-color: $topbar-background;
}
- // check if $topbar-background is differnt from $topbar-background-submenu
+ // Check if $topbar-background is differnt from $topbar-background-submenu
@if ($topbar-background != $topbar-submenu-background) {
ul ul {
background-color: $topbar-submenu-background;
}
}
-/// makes sections stacked
+/// Makes sections of a top bar stack on top of each other.
@mixin top-bar-stacked {
@if $global-flexbox {
flex-wrap: wrap;
}
}
+/// Undoes the CSS applied by the `top-bar-stacked()` mixin.
+@mixin top-bar-unstack {
+ @if $global-flexbox {
+ flex-wrap: nowrap;
+
+ .top-bar-left,
+ .top-bar-right {
+ flex: 1 1 0px;
+ }
+ }
+ @else {
+ .top-bar-left,
+ .top-bar-right {
+ width: auto;
+ }
+ }
+}
+
@mixin foundation-top-bar {
// Top bar container
.top-bar {
}
}
- // Stack on small screens as default
- @include breakpoint(small only) {
- @include top-bar-stacked;
+ // Stack on small screens by default
+ @include top-bar-stacked;
+
+ @include breakpoint($topbar-unstack-breakpoint) {
+ @include top-bar-unstack;
}
// Sub-sections