1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | $topbar-padding: 0.5rem !default;
|
12 |
|
13 |
|
14 |
|
15 | $topbar-background: $light-gray !default;
|
16 |
|
17 |
|
18 |
|
19 | $topbar-submenu-background: $topbar-background !default;
|
20 |
|
21 |
|
22 |
|
23 | $topbar-title-spacing: 0.5rem 1rem 0.5rem 0 !default;
|
24 |
|
25 |
|
26 |
|
27 | $topbar-input-width: 200px !default;
|
28 |
|
29 |
|
30 |
|
31 | $topbar-unstack-breakpoint: medium !default;
|
32 |
|
33 |
|
34 | @mixin top-bar-container {
|
35 | @if $global-flexbox {
|
36 | display: flex;
|
37 | flex-wrap: nowrap;
|
38 | justify-content: space-between;
|
39 | align-items: center;
|
40 | }
|
41 | @else {
|
42 | @include clearfix;
|
43 | }
|
44 |
|
45 | padding: $topbar-padding;
|
46 |
|
47 | &,
|
48 | ul {
|
49 | background-color: $topbar-background;
|
50 | }
|
51 |
|
52 |
|
53 | @if ($topbar-background != $topbar-submenu-background) {
|
54 | ul ul {
|
55 | background-color: $topbar-submenu-background;
|
56 | }
|
57 | }
|
58 |
|
59 |
|
60 | input {
|
61 | max-width: $topbar-input-width;
|
62 | margin-#{$global-right}: 1rem;
|
63 | }
|
64 |
|
65 |
|
66 | .input-group-field {
|
67 | width: 100%;
|
68 | margin-#{$global-right}: 0;
|
69 | }
|
70 |
|
71 | input.button {
|
72 | width: auto;
|
73 | }
|
74 | }
|
75 |
|
76 |
|
77 | @mixin top-bar-stacked {
|
78 | @if $global-flexbox {
|
79 | flex-wrap: wrap;
|
80 |
|
81 |
|
82 | .top-bar-left,
|
83 | .top-bar-right {
|
84 | flex: 0 0 100%;
|
85 | max-width: 100%;
|
86 | }
|
87 | }
|
88 | @else {
|
89 |
|
90 | .top-bar-left,
|
91 | .top-bar-right {
|
92 | width: 100%;
|
93 | }
|
94 | }
|
95 | }
|
96 |
|
97 |
|
98 | @mixin top-bar-unstack {
|
99 | @if $global-flexbox {
|
100 | flex-wrap: nowrap;
|
101 |
|
102 | .top-bar-left {
|
103 | flex: 1 1 auto;
|
104 | margin-right: auto;
|
105 | }
|
106 |
|
107 | .top-bar-right {
|
108 | flex: 0 1 auto;
|
109 | margin-left: auto;
|
110 | }
|
111 | }
|
112 | @else {
|
113 | .top-bar-left,
|
114 | .top-bar-right {
|
115 | width: auto;
|
116 | }
|
117 | }
|
118 | }
|
119 |
|
120 | @mixin foundation-top-bar {
|
121 |
|
122 | .top-bar {
|
123 | @include top-bar-container;
|
124 |
|
125 |
|
126 | @include top-bar-stacked;
|
127 |
|
128 | @include breakpoint($topbar-unstack-breakpoint) {
|
129 | @include top-bar-unstack;
|
130 | }
|
131 |
|
132 |
|
133 | @each $size in $breakpoint-classes {
|
134 | @if $size != $-zf-zero-breakpoint {
|
135 | &.stacked-for-#{$size} {
|
136 | @include breakpoint($size down) {
|
137 | @include top-bar-stacked;
|
138 | }
|
139 | }
|
140 | }
|
141 | }
|
142 | }
|
143 |
|
144 |
|
145 | @if $global-flexbox {
|
146 | .top-bar-title {
|
147 | flex: 0 0 auto;
|
148 | margin: $topbar-title-spacing;
|
149 | }
|
150 |
|
151 | .top-bar-left,
|
152 | .top-bar-right {
|
153 | flex: 0 0 auto;
|
154 | }
|
155 | }
|
156 | @else {
|
157 | .top-bar-title {
|
158 | display: inline-block;
|
159 | float: left;
|
160 | padding: $topbar-title-spacing;
|
161 |
|
162 | .menu-icon {
|
163 | bottom: 2px;
|
164 | }
|
165 | }
|
166 |
|
167 | .top-bar-left {
|
168 | float: left;
|
169 | }
|
170 |
|
171 | .top-bar-right {
|
172 | float: right;
|
173 | }
|
174 | }
|
175 | }
|