summaryrefslogtreecommitdiffstats
path: root/WebContent/VAADIN/themes/valo/util/_anim.scss
blob: 430a6e472221b57c2bc9c50f88db7b2679160469 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
@if $v-animations-enabled {

  // 'Placeholder' animation names to trigger VOverlay animation-in and animation-out
  @include keyframes(valo-placeholder-animate-in) {
    0% {
      visibility: visible;
    }
  }

  @include keyframes(valo-placeholder-animate-out) {
    100% {
      visibility: visible;
    }
  }

  @include keyframes(valo-anim-fade-in) {
    0% {
      opacity: 0;
    }
  }

  @include keyframes(valo-anim-fade-out) {
    100% {
      opacity: 0;
    }
  }

  @include keyframes(valo-anim-slide-in-down) {
    0% {
      @include transform( translateY(-100%) );
    }
  }

  @include keyframes(valo-anim-slide-in-up) {
    0% {
      @include transform( translateY(100%) );
    }
  }

  @include keyframes(valo-anim-slide-in-left) {
    0% {
      @include transform( translateX(100%) );
    }
  }

  @include keyframes(valo-anim-slide-in-right) {
    0% {
      @include transform( translateX(-100%) );
    }
  }

  @include keyframes(valo-anim-slide-out-down) {
    100% {
      @include transform( translateY(100%) );
    }
  }

  @include keyframes(valo-anim-slide-out-up) {
    100% {
      @include transform( translateY(-100%) );
    }
  }

  @include keyframes(valo-anim-slide-out-left) {
    100% {
      @include transform( translateX(-100%) );
    }
  }

  @include keyframes(valo-anim-slide-out-right) {
    100% {
      @include transform( translateX(100%) );
    }
  }

  @include keyframes(valo-overlay-animate-in) {
    0% {
      @include transform(translatey(-4px));
      opacity: 0;
    }
  }

  @include keyframes(valo-anim-drop-fade-out) {
    100% {
      opacity: 0;
      @include transform(translatey(30%));
    }
  }

}


@mixin valo-anim-fade-in ($duration: 120ms, $delay: null){
  @include animation(valo-anim-fade-in $duration $delay);
}

@mixin valo-anim-fade-out ($duration: 120ms, $delay: null){
  @include animation(valo-anim-fade-out $duration $delay);
}

@mixin valo-anim-slide-down ($duration: 260ms, $delay: null){
  @include animation(valo-anim-slide-down $duration $delay);
}

@mixin valo-anim-slide-up ($duration: 260ms, $delay: null){
  @include animation(valo-anim-slide-up $duration $delay);
}

@mixin valo-anim-slide-left ($duration: 260ms, $delay: null){
  @include animation(valo-anim-slide-left $duration $delay);
}

@mixin valo-anim-slide-right ($duration: 260ms, $delay: null){
  @include animation(valo-anim-slide-right $duration $delay);
}