-
Notifications
You must be signed in to change notification settings - Fork 0
/
mixins.scss
37 lines (31 loc) · 1.04 KB
/
mixins.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@import "variables";
@mixin box-shadow($shadows...) {
-webkit-box-shadow: $shadows;
box-shadow: $shadows;
}
@function inverse-side($side) {
@if $side == top { @return bottom; }
@else if $side == bottom { @return top; }
@else if $side == left { @return right; }
@else if $side == right { @return left; }
}
@mixin linear-gradient($gradientLine, $colorStops...) {
background-image: -webkit-linear-gradient($gradientLine, $colorStops);
background-image: -moz-linear-gradient($gradientLine, $colorStops);
background-image: -o-linear-gradient($gradientLine, $colorStops);
@if length($gradientLine) == 2 {
background-image: linear-gradient(to #{inverse-side(nth($gradientLine, 1))} #{inverse-side(nth($gradientLine, 2))}, $colorStops);
} @else {
background-image: linear-gradient(to #{inverse-side($gradientLine)}, $colorStops);
}
}
@mixin logo {
max-width: 50px;
height: auto;
@media (min-width: $screen-xs) {
max-width: 75px;
}
@media (min-width: $screen-md) {
max-width: 100px;
}
}