aboutsummaryrefslogtreecommitdiff
path: root/p/themes/Mapco/_mixins.scss
blob: 3542ade6b141fe39317a8fc6bb13a419c50847f6 (plain)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/* FUNCTIONS */

//animation
@mixin transition($target, $duration, $ease) {
    -webkit-transition: $target $duration $ease;
    -moz-transition: $target $duration $ease;
    -o-transition: $target $duration $ease;
    -ms-transition: $target $duration $ease;
    transition: $target $duration $ease;
}

//animation
@mixin animation-delay($delay) {
    -webkit-animation-delay: $delay;
    /* Safari 4.0 - 8.0 */
    animation-delay: $delay;
}

//animation
@mixin animation($animate...) {
    $max: length($animate);
    $animations: '';
    @for $i from 1 through $max {
        $animations: #{$animations + nth($animate, $i)};
        @if $i < $max {
            $animations: #{$animations + ", "};
        }
    }
    -webkit-animation: $animations;
    -moz-animation: $animations;
    -o-animation: $animations;
    -ms-transition: $animations;
    animation: $animations;
}

//keyframes
@mixin keyframes($animationName) {
    @-webkit-keyframes #{$animationName} {
        @content;
    }
    @-moz-keyframes #{$animationName} {
        @content;
    }
    @-o-keyframes #{$animationName} {
        @content;
    }
    @keyframes #{$animationName} {
        @content;
    }
}

@mixin border-radius($radius: 4px){
  -moz-border-radius: $radius;
  -webkit-border-radius: $radius;
  -ms-border-radius: $radius;
  -o-border-radius: $radius;
  -khtml-border-radius: $radius;
  border-radius: $radius;
}