-
Notifications
You must be signed in to change notification settings - Fork 0
/
_mixins.scss
40 lines (35 loc) · 1.35 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
38
39
40
@mixin box-sizing ($value) {
-webkit-box-sizing: $value;
-moz-box-sizing: $value;
box-sizing: $value;
}
@mixin box-shadow ($properties) {
-webkit-box-shadow: $properties;
-moz-box-shadow: $properties;
box-shadow: $properties;
}
@mixin transform ($properties) {
-webkit-transform: $properties;
-moz-transform: $properties;
-o-transform: $properties;
-ms-transform: $properties;
transform: $properties;
}
@mixin linear-gradient ($stops) {
$firstStop: nth($stops, 1);
$lastStop: nth($stops, length($stops));
$firstColor: nth($firstStop, 1);
$lastColor: nth($lastStop, 1);
$oldWebkitColorStops: ();
@each $stop in $stops {
$oldWebkitColorStops: append($oldWebkitColorStops, color-stop(nth($stop, 2),nth($stop, 1)) + ",");
}
background: #{$firstColor}; /* Old browsers */
background: -moz-linear-gradient(top, #{$stops}); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, $oldWebkitColorStops); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #{$stops}); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #{$stops}); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #{$stops}); /* IE10+ */
background: linear-gradient(to bottom, #{$stops}); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#{$firstColor}', endColorstr='#{$lastColor}',GradientType=0 ); /* IE6-9 */
}