| 15747 |
anikendra |
1 |
|
|
|
2 |
// Button Mixins
|
|
|
3 |
// --------------------------------------------------
|
|
|
4 |
|
|
|
5 |
@mixin button-style($bg-color, $border-color, $active-bg-color, $active-border-color, $color) {
|
|
|
6 |
border-color: $border-color;
|
|
|
7 |
background-color: $bg-color;
|
|
|
8 |
color: $color;
|
|
|
9 |
|
|
|
10 |
// Give desktop users something to play with
|
|
|
11 |
&:hover {
|
|
|
12 |
color: $color;
|
|
|
13 |
text-decoration: none;
|
|
|
14 |
}
|
|
|
15 |
&.active,
|
|
|
16 |
&.activated {
|
|
|
17 |
border-color: $active-border-color;
|
|
|
18 |
background-color: $active-bg-color;
|
|
|
19 |
box-shadow: inset 0 1px 4px rgba(0,0,0,0.1);
|
|
|
20 |
}
|
|
|
21 |
}
|
|
|
22 |
|
|
|
23 |
@mixin button-clear($color, $font-size:"") {
|
|
|
24 |
&.button-clear {
|
|
|
25 |
border-color: transparent;
|
|
|
26 |
background: none;
|
|
|
27 |
box-shadow: none;
|
|
|
28 |
color: $color;
|
|
|
29 |
|
|
|
30 |
@if $font-size != "" {
|
|
|
31 |
font-size: $font-size;
|
|
|
32 |
}
|
|
|
33 |
}
|
|
|
34 |
&.button-icon {
|
|
|
35 |
border-color: transparent;
|
|
|
36 |
background: none;
|
|
|
37 |
}
|
|
|
38 |
}
|
|
|
39 |
|
|
|
40 |
@mixin button-outline($color, $text-color:"") {
|
|
|
41 |
&.button-outline {
|
|
|
42 |
border-color: $color;
|
|
|
43 |
background: transparent;
|
|
|
44 |
@if $text-color == "" {
|
|
|
45 |
$text-color: $color;
|
|
|
46 |
}
|
|
|
47 |
color: $text-color;
|
|
|
48 |
&.active,
|
|
|
49 |
&.activated {
|
|
|
50 |
background-color: $color;
|
|
|
51 |
box-shadow: none;
|
|
|
52 |
color: #fff;
|
|
|
53 |
}
|
|
|
54 |
}
|
|
|
55 |
}
|
|
|
56 |
|
|
|
57 |
|
|
|
58 |
// Bar Mixins
|
|
|
59 |
// --------------------------------------------------
|
|
|
60 |
|
|
|
61 |
@mixin bar-style($bg-color, $border-color, $color) {
|
|
|
62 |
border-color: $border-color;
|
|
|
63 |
background-color: $bg-color;
|
|
|
64 |
background-image: linear-gradient(0deg, $border-color, $border-color 50%, transparent 50%);
|
|
|
65 |
color: $color;
|
|
|
66 |
|
|
|
67 |
.title {
|
|
|
68 |
color: $color;
|
|
|
69 |
}
|
|
|
70 |
}
|
|
|
71 |
|
|
|
72 |
|
|
|
73 |
// Tab Mixins
|
|
|
74 |
// --------------------------------------------------
|
|
|
75 |
|
|
|
76 |
@mixin tab-style($bg-color, $border-color, $color) {
|
|
|
77 |
border-color: $border-color;
|
|
|
78 |
background-color: $bg-color;
|
|
|
79 |
background-image: linear-gradient(0deg, $border-color, $border-color 50%, transparent 50%);
|
|
|
80 |
color: $color;
|
|
|
81 |
}
|
|
|
82 |
|
|
|
83 |
@mixin tab-badge-style($bg-color, $color) {
|
|
|
84 |
.tab-item .badge {
|
|
|
85 |
background-color: $bg-color;
|
|
|
86 |
color: $color;
|
|
|
87 |
}
|
|
|
88 |
}
|
|
|
89 |
|
|
|
90 |
|
|
|
91 |
// Item Mixins
|
|
|
92 |
// --------------------------------------------------
|
|
|
93 |
|
|
|
94 |
@mixin item-style($bg-color, $border-color, $color) {
|
|
|
95 |
border-color: $border-color;
|
|
|
96 |
background-color: $bg-color;
|
|
|
97 |
color: $color;
|
|
|
98 |
}
|
|
|
99 |
|
|
|
100 |
@mixin item-active-style($active-bg-color, $active-border-color) {
|
|
|
101 |
border-color: $active-border-color;
|
|
|
102 |
background-color: $active-bg-color;
|
|
|
103 |
}
|
|
|
104 |
|
|
|
105 |
|
|
|
106 |
// Badge Mixins
|
|
|
107 |
// --------------------------------------------------
|
|
|
108 |
|
|
|
109 |
@mixin badge-style($bg-color, $color) {
|
|
|
110 |
background-color: $bg-color;
|
|
|
111 |
color: $color;
|
|
|
112 |
}
|
|
|
113 |
|
|
|
114 |
|
|
|
115 |
// Range Mixins
|
|
|
116 |
// --------------------------------------------------
|
|
|
117 |
|
|
|
118 |
@mixin range-style($track-bg-color) {
|
|
|
119 |
&::-webkit-slider-thumb:before {
|
|
|
120 |
background: $track-bg-color;
|
|
|
121 |
}
|
|
|
122 |
&::-ms-fill-lower{
|
|
|
123 |
background: $track-bg-color;
|
|
|
124 |
}
|
|
|
125 |
}
|
|
|
126 |
|
|
|
127 |
|
|
|
128 |
// Checkbox Mixins
|
|
|
129 |
// --------------------------------------------------
|
|
|
130 |
|
|
|
131 |
@mixin checkbox-style($off-border-color, $on-bg-color, $on-border-color) {
|
|
|
132 |
& input:before,
|
|
|
133 |
& .checkbox-icon:before {
|
|
|
134 |
border-color: $off-border-color;
|
|
|
135 |
}
|
|
|
136 |
|
|
|
137 |
// what the background looks like when its checked
|
|
|
138 |
& input:checked:before,
|
|
|
139 |
& input:checked + .checkbox-icon:before {
|
|
|
140 |
background: $on-bg-color;
|
|
|
141 |
border-color: $on-border-color;
|
|
|
142 |
}
|
|
|
143 |
}
|
|
|
144 |
|
|
|
145 |
|
|
|
146 |
// Toggle Mixins
|
|
|
147 |
// --------------------------------------------------
|
|
|
148 |
|
|
|
149 |
@mixin toggle-style($on-border-color, $on-bg-color) {
|
|
|
150 |
// the track when the toggle is "on"
|
|
|
151 |
& input:checked + .track {
|
|
|
152 |
border-color: $on-border-color;
|
|
|
153 |
background-color: $on-bg-color;
|
|
|
154 |
}
|
|
|
155 |
}
|
|
|
156 |
@mixin toggle-small-style($on-bg-color) {
|
|
|
157 |
// the track when the toggle is "on"
|
|
|
158 |
& input:checked + .track {
|
|
|
159 |
background-color: rgba($on-bg-color, .5);
|
|
|
160 |
}
|
|
|
161 |
& input:checked + .track .handle {
|
|
|
162 |
background-color: $on-bg-color;
|
|
|
163 |
}
|
|
|
164 |
}
|
|
|
165 |
|
|
|
166 |
|
|
|
167 |
// Clearfix
|
|
|
168 |
// --------------------------------------------------
|
|
|
169 |
|
|
|
170 |
@mixin clearfix {
|
|
|
171 |
*zoom: 1;
|
|
|
172 |
&:before,
|
|
|
173 |
&:after {
|
|
|
174 |
display: table;
|
|
|
175 |
content: "";
|
|
|
176 |
line-height: 0;
|
|
|
177 |
}
|
|
|
178 |
&:after {
|
|
|
179 |
clear: both;
|
|
|
180 |
}
|
|
|
181 |
}
|
|
|
182 |
|
|
|
183 |
|
|
|
184 |
// Placeholder text
|
|
|
185 |
// --------------------------------------------------
|
|
|
186 |
|
|
|
187 |
@mixin placeholder($color: $input-color-placeholder, $text-indent: 0) {
|
|
|
188 |
&::-moz-placeholder { // Firefox 19+
|
|
|
189 |
color: $color;
|
|
|
190 |
}
|
|
|
191 |
&:-ms-input-placeholder {
|
|
|
192 |
color: $color;
|
|
|
193 |
}
|
|
|
194 |
&::-webkit-input-placeholder {
|
|
|
195 |
color: $color;
|
|
|
196 |
// Safari placeholder margin issue
|
|
|
197 |
text-indent: $text-indent;
|
|
|
198 |
}
|
|
|
199 |
}
|
|
|
200 |
|
|
|
201 |
|
|
|
202 |
// Text Mixins
|
|
|
203 |
// --------------------------------------------------
|
|
|
204 |
|
|
|
205 |
@mixin text-size-adjust($value: none) {
|
|
|
206 |
-webkit-text-size-adjust: $value;
|
|
|
207 |
-moz-text-size-adjust: $value;
|
|
|
208 |
text-size-adjust: $value;
|
|
|
209 |
}
|
|
|
210 |
@mixin tap-highlight-transparent() {
|
|
|
211 |
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
|
|
212 |
-webkit-tap-highlight-color: transparent; // For some Androids
|
|
|
213 |
}
|
|
|
214 |
@mixin touch-callout($value: none) {
|
|
|
215 |
-webkit-touch-callout: $value;
|
|
|
216 |
}
|
|
|
217 |
|
|
|
218 |
|
|
|
219 |
// Font Mixins
|
|
|
220 |
// --------------------------------------------------
|
|
|
221 |
|
|
|
222 |
@mixin font-family-serif() {
|
|
|
223 |
font-family: $serif-font-family;
|
|
|
224 |
}
|
|
|
225 |
@mixin font-family-sans-serif() {
|
|
|
226 |
font-family: $sans-font-family;
|
|
|
227 |
}
|
|
|
228 |
@mixin font-family-monospace() {
|
|
|
229 |
font-family: $mono-font-family;
|
|
|
230 |
}
|
|
|
231 |
@mixin font-shorthand($size: $base-font-size, $weight: normal, $line-height: $base-line-height) {
|
|
|
232 |
font-weight: $weight;
|
|
|
233 |
font-size: $size;
|
|
|
234 |
line-height: $line-height;
|
|
|
235 |
}
|
|
|
236 |
@mixin font-serif($size: $base-font-size, $weight: normal, $line-height: $base-line-height) {
|
|
|
237 |
@include font-family-serif();
|
|
|
238 |
@include font-shorthand($size, $weight, $line-height);
|
|
|
239 |
}
|
|
|
240 |
@mixin font-sans-serif($size: $base-font-size, $weight: normal, $line-height: $base-line-height) {
|
|
|
241 |
@include font-family-sans-serif();
|
|
|
242 |
@include font-shorthand($size, $weight, $line-height);
|
|
|
243 |
}
|
|
|
244 |
@mixin font-monospace($size: $base-font-size, $weight: normal, $line-height: $base-line-height) {
|
|
|
245 |
@include font-family-monospace();
|
|
|
246 |
@include font-shorthand($size, $weight, $line-height);
|
|
|
247 |
}
|
|
|
248 |
@mixin font-smoothing($font-smoothing) {
|
|
|
249 |
-webkit-font-smoothing: $font-smoothing;
|
|
|
250 |
font-smoothing: $font-smoothing;
|
|
|
251 |
}
|
|
|
252 |
|
|
|
253 |
|
|
|
254 |
// Appearance
|
|
|
255 |
// --------------------------------------------------
|
|
|
256 |
|
|
|
257 |
@mixin appearance($val) {
|
|
|
258 |
-webkit-appearance: $val;
|
|
|
259 |
-moz-appearance: $val;
|
|
|
260 |
appearance: $val;
|
|
|
261 |
}
|
|
|
262 |
|
|
|
263 |
|
|
|
264 |
// Border Radius Mixins
|
|
|
265 |
// --------------------------------------------------
|
|
|
266 |
|
|
|
267 |
@mixin border-radius($radius) {
|
|
|
268 |
-webkit-border-radius: $radius;
|
|
|
269 |
border-radius: $radius;
|
|
|
270 |
}
|
|
|
271 |
|
|
|
272 |
// Single Corner Border Radius
|
|
|
273 |
@mixin border-top-left-radius($radius) {
|
|
|
274 |
-webkit-border-top-left-radius: $radius;
|
|
|
275 |
border-top-left-radius: $radius;
|
|
|
276 |
}
|
|
|
277 |
@mixin border-top-right-radius($radius) {
|
|
|
278 |
-webkit-border-top-right-radius: $radius;
|
|
|
279 |
border-top-right-radius: $radius;
|
|
|
280 |
}
|
|
|
281 |
@mixin border-bottom-right-radius($radius) {
|
|
|
282 |
-webkit-border-bottom-right-radius: $radius;
|
|
|
283 |
border-bottom-right-radius: $radius;
|
|
|
284 |
}
|
|
|
285 |
@mixin border-bottom-left-radius($radius) {
|
|
|
286 |
-webkit-border-bottom-left-radius: $radius;
|
|
|
287 |
border-bottom-left-radius: $radius;
|
|
|
288 |
}
|
|
|
289 |
|
|
|
290 |
// Single Side Border Radius
|
|
|
291 |
@mixin border-top-radius($radius) {
|
|
|
292 |
@include border-top-right-radius($radius);
|
|
|
293 |
@include border-top-left-radius($radius);
|
|
|
294 |
}
|
|
|
295 |
@mixin border-right-radius($radius) {
|
|
|
296 |
@include border-top-right-radius($radius);
|
|
|
297 |
@include border-bottom-right-radius($radius);
|
|
|
298 |
}
|
|
|
299 |
@mixin border-bottom-radius($radius) {
|
|
|
300 |
@include border-bottom-right-radius($radius);
|
|
|
301 |
@include border-bottom-left-radius($radius);
|
|
|
302 |
}
|
|
|
303 |
@mixin border-left-radius($radius) {
|
|
|
304 |
@include border-top-left-radius($radius);
|
|
|
305 |
@include border-bottom-left-radius($radius);
|
|
|
306 |
}
|
|
|
307 |
|
|
|
308 |
|
|
|
309 |
// Box shadows
|
|
|
310 |
// --------------------------------------------------
|
|
|
311 |
|
|
|
312 |
@mixin box-shadow($shadow...) {
|
|
|
313 |
-webkit-box-shadow: $shadow;
|
|
|
314 |
box-shadow: $shadow;
|
|
|
315 |
}
|
|
|
316 |
|
|
|
317 |
|
|
|
318 |
// Transition Mixins
|
|
|
319 |
// --------------------------------------------------
|
|
|
320 |
|
|
|
321 |
@mixin transition($transition...) {
|
|
|
322 |
-webkit-transition: $transition;
|
|
|
323 |
transition: $transition;
|
|
|
324 |
}
|
|
|
325 |
@mixin transition-delay($transition-delay) {
|
|
|
326 |
-webkit-transition-delay: $transition-delay;
|
|
|
327 |
transition-delay: $transition-delay;
|
|
|
328 |
}
|
|
|
329 |
@mixin transition-duration($transition-duration) {
|
|
|
330 |
-webkit-transition-duration: $transition-duration;
|
|
|
331 |
transition-duration: $transition-duration;
|
|
|
332 |
}
|
|
|
333 |
@mixin transition-timing-function($transition-timing) {
|
|
|
334 |
-webkit-transition-timing-function: $transition-timing;
|
|
|
335 |
transition-timing-function: $transition-timing;
|
|
|
336 |
}
|
|
|
337 |
@mixin transition-property($property) {
|
|
|
338 |
-webkit-transition-property: $property;
|
|
|
339 |
transition-property: $property;
|
|
|
340 |
}
|
|
|
341 |
@mixin transition-transform($properties...) {
|
|
|
342 |
// special case cuz of transform vendor prefixes
|
|
|
343 |
-webkit-transition: -webkit-transform $properties;
|
|
|
344 |
transition: transform $properties;
|
|
|
345 |
}
|
|
|
346 |
|
|
|
347 |
|
|
|
348 |
// Animation Mixins
|
|
|
349 |
// --------------------------------------------------
|
|
|
350 |
|
|
|
351 |
@mixin animation($animation) {
|
|
|
352 |
-webkit-animation: $animation;
|
|
|
353 |
animation: $animation;
|
|
|
354 |
}
|
|
|
355 |
@mixin animation-duration($duration) {
|
|
|
356 |
-webkit-animation-duration: $duration;
|
|
|
357 |
animation-duration: $duration;
|
|
|
358 |
}
|
|
|
359 |
@mixin animation-direction($direction) {
|
|
|
360 |
-webkit-animation-direction: $direction;
|
|
|
361 |
animation-direction: $direction;
|
|
|
362 |
}
|
|
|
363 |
@mixin animation-timing-function($animation-timing) {
|
|
|
364 |
-webkit-animation-timing-function: $animation-timing;
|
|
|
365 |
animation-timing-function: $animation-timing;
|
|
|
366 |
}
|
|
|
367 |
@mixin animation-fill-mode($fill-mode) {
|
|
|
368 |
-webkit-animation-fill-mode: $fill-mode;
|
|
|
369 |
animation-fill-mode: $fill-mode;
|
|
|
370 |
}
|
|
|
371 |
@mixin animation-name($name...) {
|
|
|
372 |
-webkit-animation-name: $name;
|
|
|
373 |
animation-name: $name;
|
|
|
374 |
}
|
|
|
375 |
@mixin animation-iteration-count($count) {
|
|
|
376 |
-webkit-animation-iteration-count: $count;
|
|
|
377 |
animation-iteration-count: $count;
|
|
|
378 |
}
|
|
|
379 |
|
|
|
380 |
|
|
|
381 |
// Transformation Mixins
|
|
|
382 |
// --------------------------------------------------
|
|
|
383 |
|
|
|
384 |
@mixin rotate($degrees) {
|
|
|
385 |
@include transform( rotate($degrees) );
|
|
|
386 |
}
|
|
|
387 |
@mixin scale($ratio) {
|
|
|
388 |
@include transform( scale($ratio) );
|
|
|
389 |
}
|
|
|
390 |
@mixin translate($x, $y) {
|
|
|
391 |
@include transform( translate($x, $y) );
|
|
|
392 |
}
|
|
|
393 |
@mixin skew($x, $y) {
|
|
|
394 |
@include transform( skew($x, $y) );
|
|
|
395 |
-webkit-backface-visibility: hidden;
|
|
|
396 |
}
|
|
|
397 |
@mixin translate3d($x, $y, $z) {
|
|
|
398 |
@include transform( translate3d($x, $y, $z) );
|
|
|
399 |
}
|
|
|
400 |
@mixin translateZ($z) {
|
|
|
401 |
@include transform( translateZ($z) );
|
|
|
402 |
}
|
|
|
403 |
@mixin transform($val) {
|
|
|
404 |
-webkit-transform: $val;
|
|
|
405 |
transform: $val;
|
|
|
406 |
}
|
|
|
407 |
|
|
|
408 |
@mixin transform-origin($left, $top) {
|
|
|
409 |
-webkit-transform-origin: $left $top;
|
|
|
410 |
transform-origin: $left $top;
|
|
|
411 |
}
|
|
|
412 |
|
|
|
413 |
|
|
|
414 |
// Backface visibility
|
|
|
415 |
// --------------------------------------------------
|
|
|
416 |
// Prevent browsers from flickering when using CSS 3D transforms.
|
|
|
417 |
// Default value is `visible`, but can be changed to `hidden
|
|
|
418 |
|
|
|
419 |
@mixin backface-visibility($visibility){
|
|
|
420 |
-webkit-backface-visibility: $visibility;
|
|
|
421 |
backface-visibility: $visibility;
|
|
|
422 |
}
|
|
|
423 |
|
|
|
424 |
|
|
|
425 |
// Background clipping
|
|
|
426 |
// --------------------------------------------------
|
|
|
427 |
|
|
|
428 |
@mixin background-clip($clip) {
|
|
|
429 |
-webkit-background-clip: $clip;
|
|
|
430 |
background-clip: $clip;
|
|
|
431 |
}
|
|
|
432 |
|
|
|
433 |
|
|
|
434 |
// Background sizing
|
|
|
435 |
// --------------------------------------------------
|
|
|
436 |
|
|
|
437 |
@mixin background-size($size) {
|
|
|
438 |
-webkit-background-size: $size;
|
|
|
439 |
background-size: $size;
|
|
|
440 |
}
|
|
|
441 |
|
|
|
442 |
|
|
|
443 |
// Box sizing
|
|
|
444 |
// --------------------------------------------------
|
|
|
445 |
|
|
|
446 |
@mixin box-sizing($boxmodel) {
|
|
|
447 |
-webkit-box-sizing: $boxmodel;
|
|
|
448 |
-moz-box-sizing: $boxmodel;
|
|
|
449 |
box-sizing: $boxmodel;
|
|
|
450 |
}
|
|
|
451 |
|
|
|
452 |
|
|
|
453 |
// User select
|
|
|
454 |
// --------------------------------------------------
|
|
|
455 |
|
|
|
456 |
@mixin user-select($select) {
|
|
|
457 |
-webkit-user-select: $select;
|
|
|
458 |
-moz-user-select: $select;
|
|
|
459 |
-ms-user-select: $select;
|
|
|
460 |
user-select: $select;
|
|
|
461 |
}
|
|
|
462 |
|
|
|
463 |
|
|
|
464 |
// Content Columns
|
|
|
465 |
// --------------------------------------------------
|
|
|
466 |
|
|
|
467 |
@mixin content-columns($columnCount, $columnGap: $grid-gutter-width) {
|
|
|
468 |
-webkit-column-count: $columnCount;
|
|
|
469 |
-moz-column-count: $columnCount;
|
|
|
470 |
column-count: $columnCount;
|
|
|
471 |
-webkit-column-gap: $columnGap;
|
|
|
472 |
-moz-column-gap: $columnGap;
|
|
|
473 |
column-gap: $columnGap;
|
|
|
474 |
}
|
|
|
475 |
|
|
|
476 |
|
|
|
477 |
// Flexbox Mixins
|
|
|
478 |
// --------------------------------------------------
|
|
|
479 |
// http://philipwalton.github.io/solved-by-flexbox/
|
|
|
480 |
// https://github.com/philipwalton/solved-by-flexbox
|
|
|
481 |
|
|
|
482 |
@mixin display-flex {
|
|
|
483 |
display: -webkit-box;
|
|
|
484 |
display: -webkit-flex;
|
|
|
485 |
display: -moz-box;
|
|
|
486 |
display: -moz-flex;
|
|
|
487 |
display: -ms-flexbox;
|
|
|
488 |
display: flex;
|
|
|
489 |
}
|
|
|
490 |
|
|
|
491 |
@mixin display-inline-flex {
|
|
|
492 |
display: -webkit-inline-box;
|
|
|
493 |
display: -webkit-inline-flex;
|
|
|
494 |
display: -moz-inline-flex;
|
|
|
495 |
display: -ms-inline-flexbox;
|
|
|
496 |
display: inline-flex;
|
|
|
497 |
}
|
|
|
498 |
|
|
|
499 |
@mixin flex-direction($value: row) {
|
|
|
500 |
@if $value == row-reverse {
|
|
|
501 |
-webkit-box-direction: reverse;
|
|
|
502 |
-webkit-box-orient: horizontal;
|
|
|
503 |
} @else if $value == column {
|
|
|
504 |
-webkit-box-direction: normal;
|
|
|
505 |
-webkit-box-orient: vertical;
|
|
|
506 |
} @else if $value == column-reverse {
|
|
|
507 |
-webkit-box-direction: reverse;
|
|
|
508 |
-webkit-box-orient: vertical;
|
|
|
509 |
} @else {
|
|
|
510 |
-webkit-box-direction: normal;
|
|
|
511 |
-webkit-box-orient: horizontal;
|
|
|
512 |
}
|
|
|
513 |
-webkit-flex-direction: $value;
|
|
|
514 |
-moz-flex-direction: $value;
|
|
|
515 |
-ms-flex-direction: $value;
|
|
|
516 |
flex-direction: $value;
|
|
|
517 |
}
|
|
|
518 |
|
|
|
519 |
@mixin flex-wrap($value: nowrap) {
|
|
|
520 |
// No Webkit Box fallback.
|
|
|
521 |
-webkit-flex-wrap: $value;
|
|
|
522 |
-moz-flex-wrap: $value;
|
|
|
523 |
@if $value == nowrap {
|
|
|
524 |
-ms-flex-wrap: none;
|
|
|
525 |
} @else {
|
|
|
526 |
-ms-flex-wrap: $value;
|
|
|
527 |
}
|
|
|
528 |
flex-wrap: $value;
|
|
|
529 |
}
|
|
|
530 |
|
|
|
531 |
@mixin flex($fg: 1, $fs: null, $fb: null) {
|
|
|
532 |
-webkit-box-flex: $fg;
|
|
|
533 |
-webkit-flex: $fg $fs $fb;
|
|
|
534 |
-moz-box-flex: $fg;
|
|
|
535 |
-moz-flex: $fg $fs $fb;
|
|
|
536 |
-ms-flex: $fg $fs $fb;
|
|
|
537 |
flex: $fg $fs $fb;
|
|
|
538 |
}
|
|
|
539 |
|
|
|
540 |
@mixin flex-flow($values: (row nowrap)) {
|
|
|
541 |
// No Webkit Box fallback.
|
|
|
542 |
-webkit-flex-flow: $values;
|
|
|
543 |
-moz-flex-flow: $values;
|
|
|
544 |
-ms-flex-flow: $values;
|
|
|
545 |
flex-flow: $values;
|
|
|
546 |
}
|
|
|
547 |
|
|
|
548 |
@mixin align-items($value: stretch) {
|
|
|
549 |
@if $value == flex-start {
|
|
|
550 |
-webkit-box-align: start;
|
|
|
551 |
-ms-flex-align: start;
|
|
|
552 |
} @else if $value == flex-end {
|
|
|
553 |
-webkit-box-align: end;
|
|
|
554 |
-ms-flex-align: end;
|
|
|
555 |
} @else {
|
|
|
556 |
-webkit-box-align: $value;
|
|
|
557 |
-ms-flex-align: $value;
|
|
|
558 |
}
|
|
|
559 |
-webkit-align-items: $value;
|
|
|
560 |
-moz-align-items: $value;
|
|
|
561 |
align-items: $value;
|
|
|
562 |
}
|
|
|
563 |
|
|
|
564 |
@mixin align-self($value: auto) {
|
|
|
565 |
-webkit-align-self: $value;
|
|
|
566 |
-moz-align-self: $value;
|
|
|
567 |
@if $value == flex-start {
|
|
|
568 |
-ms-flex-item-align: start;
|
|
|
569 |
} @else if $value == flex-end {
|
|
|
570 |
-ms-flex-item-align: end;
|
|
|
571 |
} @else {
|
|
|
572 |
-ms-flex-item-align: $value;
|
|
|
573 |
}
|
|
|
574 |
align-self: $value;
|
|
|
575 |
}
|
|
|
576 |
|
|
|
577 |
@mixin align-content($value: stretch) {
|
|
|
578 |
-webkit-align-content: $value;
|
|
|
579 |
-moz-align-content: $value;
|
|
|
580 |
@if $value == flex-start {
|
|
|
581 |
-ms-flex-line-pack: start;
|
|
|
582 |
} @else if $value == flex-end {
|
|
|
583 |
-ms-flex-line-pack: end;
|
|
|
584 |
} @else {
|
|
|
585 |
-ms-flex-line-pack: $value;
|
|
|
586 |
}
|
|
|
587 |
align-content: $value;
|
|
|
588 |
}
|
|
|
589 |
|
|
|
590 |
@mixin justify-content($value: stretch) {
|
|
|
591 |
@if $value == flex-start {
|
|
|
592 |
-webkit-box-pack: start;
|
|
|
593 |
-ms-flex-pack: start;
|
|
|
594 |
} @else if $value == flex-end {
|
|
|
595 |
-webkit-box-pack: end;
|
|
|
596 |
-ms-flex-pack: end;
|
|
|
597 |
} @else if $value == space-between {
|
|
|
598 |
-webkit-box-pack: justify;
|
|
|
599 |
-ms-flex-pack: justify;
|
|
|
600 |
} @else {
|
|
|
601 |
-webkit-box-pack: $value;
|
|
|
602 |
-ms-flex-pack: $value;
|
|
|
603 |
}
|
|
|
604 |
-webkit-justify-content: $value;
|
|
|
605 |
-moz-justify-content: $value;
|
|
|
606 |
justify-content: $value;
|
|
|
607 |
}
|
|
|
608 |
|
|
|
609 |
@mixin flex-order($n) {
|
|
|
610 |
-webkit-order: $n;
|
|
|
611 |
-ms-flex-order: $n;
|
|
|
612 |
order: $n;
|
|
|
613 |
-webkit-box-ordinal-group: $n;
|
|
|
614 |
}
|
|
|
615 |
|
|
|
616 |
@mixin responsive-grid-break($selector, $max-width) {
|
|
|
617 |
@media (max-width: $max-width) {
|
|
|
618 |
#{$selector} {
|
|
|
619 |
-webkit-box-direction: normal;
|
|
|
620 |
-moz-box-direction: normal;
|
|
|
621 |
-webkit-box-orient: vertical;
|
|
|
622 |
-moz-box-orient: vertical;
|
|
|
623 |
-webkit-flex-direction: column;
|
|
|
624 |
-ms-flex-direction: column;
|
|
|
625 |
flex-direction: column;
|
|
|
626 |
|
|
|
627 |
.col, .col-10, .col-20, .col-25, .col-33, .col-34, .col-50, .col-66, .col-67, .col-75, .col-80, .col-90 {
|
|
|
628 |
@include flex(1);
|
|
|
629 |
margin-bottom: ($grid-padding-width * 3) / 2;
|
|
|
630 |
margin-left: 0;
|
|
|
631 |
max-width: 100%;
|
|
|
632 |
width: 100%;
|
|
|
633 |
}
|
|
|
634 |
}
|
|
|
635 |
}
|
|
|
636 |
}
|