_animations.scss 6.47 KB
Newer Older
1 2 3 4
// home-header-pop-up animation
//************************************************************************//

.animation-home-header-pop-up {
5
  @include animation(home-header-pop-up 1.15s ease-in-out);
6 7 8 9 10 11
  @include animation-fill-mode(both);
  @include animation-delay(1s);
}

@mixin home-header-pop-up-keyframes {
  0% {
12
    opacity: 0;
13 14 15
    top: 300px;
    //@include transform(scale(0.9));
  }
16

17
  45% {
18
    opacity: 1;
19
  }
20

21 22 23 24
  65% {
    top: -40px;
    //@include transform(scale(1));
  }
25

26 27 28
  85% {
    top: 10px;
  }
29

30
  100% {
31
    top: 0;
32 33 34 35
  }
}

@-webkit-keyframes home-header-pop-up { @include home-header-pop-up-keyframes; }
36 37 38 39

@-moz-keyframes home-header-pop-up { @include home-header-pop-up-keyframes; }

@keyframes home-header-pop-up { @include home-header-pop-up-keyframes; }
40

Matthew Mongeau committed
41 42 43 44 45 46 47 48 49 50 51
// title appear animation
//************************************************************************//

.animation-title-appear {
  @include animation(title-appear 4.65s ease-out);
  @include animation-fill-mode(both);
  @include animation-delay(1s);
}

@mixin title-appear-keyframes {
  0% {
52
    opacity: 0;
Matthew Mongeau committed
53
    top: 60px;
54

Matthew Mongeau committed
55 56
    @include transform(scale(0.9));
  }
57

Matthew Mongeau committed
58
  20% {
59
    opacity: 1;
Matthew Mongeau committed
60
  }
61

Matthew Mongeau committed
62 63
  27% { // this % of total-time should be ~ 1.25s
    top: 40px;
64

Matthew Mongeau committed
65 66
    @include transform(scale(1));
  }
67

Matthew Mongeau committed
68
  90% { // this % of total-time is when 2nd half of animation starts
69
    opacity: 1;
Matthew Mongeau committed
70
    top: 40px;
71

Matthew Mongeau committed
72 73
    @include transform(scale(1));
  }
74

Matthew Mongeau committed
75
  100% {
76
    top: 0;
Matthew Mongeau committed
77 78 79 80
  }
}

@-webkit-keyframes title-appear { @include title-appear-keyframes; }
81 82 83 84

@-moz-keyframes title-appear { @include title-appear-keyframes; }

@keyframes title-appear { @include title-appear-keyframes; }
Matthew Mongeau committed
85 86 87 88 89 90 91 92 93 94 95 96

// home appear animation
//************************************************************************//

.animation-home-appear {
  @include animation(home-appear 4.25s ease-out);
  @include animation-fill-mode(both);
  @include animation-delay(1s);
}

@mixin home-appear-keyframes {
  0% {
97
    opacity: 0;
Matthew Mongeau committed
98
    top: 60px;
99

Matthew Mongeau committed
100 101
    @include transform(scale(0.9));
  }
102

Matthew Mongeau committed
103
  20% {
104
    opacity: 1;
Matthew Mongeau committed
105
  }
106

Matthew Mongeau committed
107 108
  30% { // this % of total-time should be ~ 1.25s
    top: 40px;
109

Matthew Mongeau committed
110 111
    @include transform(scale(1));
  }
112

Matthew Mongeau committed
113
  80% { // this % of total-time is when 2nd half of animation starts
114
    opacity: 1;
Matthew Mongeau committed
115
    top: 40px;
116

Matthew Mongeau committed
117 118
    @include transform(scale(1));
  }
119

Matthew Mongeau committed
120
  100% {
121
    opacity: 0;
Matthew Mongeau committed
122
    top: 60px;
123

Matthew Mongeau committed
124 125 126 127 128
    @include transform(scale(0.7));
  }
}

@-webkit-keyframes home-appear { @include home-appear-keyframes; }
129 130 131 132

@-moz-keyframes home-appear { @include home-appear-keyframes; }

@keyframes home-appear { @include home-appear-keyframes; }
Matthew Mongeau committed
133 134 135 136 137 138 139 140 141 142 143 144

// edx animation
//************************************************************************//

.animation-edx-appear {
  @include animation(edx-appear 1.25s ease-in);
  @include animation-fill-mode(both);
  @include animation-delay(2.15s);
}

@mixin edx-appear-keyframes {
  0% {
145
    opacity: 0;
Matthew Mongeau committed
146
  }
147

Matthew Mongeau committed
148
  100% {
149
    opacity: 1;
Matthew Mongeau committed
150 151 152 153
  }
}

@-webkit-keyframes edx-appear { @include edx-appear-keyframes; }
154 155 156 157

@-moz-keyframes edx-appear { @include edx-appear-keyframes; }

@keyframes edx-appear { @include edx-appear-keyframes; }
Matthew Mongeau committed
158 159 160 161 162 163 164 165 166 167 168 169 170 171

// mit animation
//************************************************************************//

.animation-mit-slide {
  @include animation(mit-slide 1.15s ease-out);
  @include animation-fill-mode(both);
  @include animation-delay(2s);
}

@mixin mit-slide-keyframes {
  0% {
    left: 80px;
  }
172

Matthew Mongeau committed
173
  100% {
174
    left: 0;
Matthew Mongeau committed
175 176 177 178
  }
}

@-webkit-keyframes mit-slide { @include mit-slide-keyframes; }
179 180 181 182

@-moz-keyframes mit-slide { @include mit-slide-keyframes; }

@keyframes mit-slide { @include mit-slide-keyframes; }
Matthew Mongeau committed
183 184 185 186 187 188 189 190 191 192 193 194 195 196

// harvard animation
//************************************************************************//

.animation-harvard-slide {
  @include animation(harvard-slide 1.15s ease-out);
  @include animation-fill-mode(both);
  @include animation-delay(2s);
}

@mixin harvard-slide-keyframes {
  0% {
    right: 80px;
  }
197

Matthew Mongeau committed
198
  100% {
199
    right: 0;
Matthew Mongeau committed
200 201 202 203
  }
}

@-webkit-keyframes harvard-slide { @include harvard-slide-keyframes; }
204 205 206 207

@-moz-keyframes harvard-slide { @include harvard-slide-keyframes; }

@keyframes harvard-slide { @include harvard-slide-keyframes; }
Matthew Mongeau committed
208 209 210 211 212 213 214 215 216 217 218 219 220 221

// divider left animation
//************************************************************************//

.animation-divider-left-slide {
  @include animation(divider-left-slide 1.1s ease-out);
  @include animation-fill-mode(both);
  @include animation-delay(2s);
}

@mixin divider-left-slide-keyframes {
  0% {
    left: 340px;
  }
222

Matthew Mongeau committed
223 224 225 226 227 228
  100% {
    left: 200px;
  }
}

@-webkit-keyframes divider-left-slide { @include divider-left-slide-keyframes; }
229 230 231 232

@-moz-keyframes divider-left-slide { @include divider-left-slide-keyframes; }

@keyframes divider-left-slide { @include divider-left-slide-keyframes; }
Matthew Mongeau committed
233 234 235 236 237 238 239 240 241 242 243 244 245 246

// divider right animation
//************************************************************************//

.animation-divider-right-slide {
  @include animation(divider-right-slide 1.1s ease-out);
  @include animation-fill-mode(both);
  @include animation-delay(2s);
}

@mixin divider-right-slide-keyframes {
  0% {
    left: 340px;
  }
247

Matthew Mongeau committed
248 249 250 251 252 253
  100% {
    left: 480px;
  }
}

@-webkit-keyframes divider-right-slide { @include divider-right-slide-keyframes; }
254 255 256 257

@-moz-keyframes divider-right-slide { @include divider-right-slide-keyframes; }

@keyframes divider-right-slide { @include divider-right-slide-keyframes; }
Matthew Mongeau committed
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272

// video appear animation
//************************************************************************//

.animation-video-appear {
  @include animation(video-appear 1.25s ease-out);
  @include animation-fill-mode(both);
  @include animation-delay(4.4s);
}

@mixin video-appear-keyframes {
  0% {
    bottom: -270px;
    opacity: 0.9;
  }
273

Matthew Mongeau committed
274
  80% {
275
    opacity: 1;
Matthew Mongeau committed
276
  }
277

Matthew Mongeau committed
278
  100% {
279
    bottom: 0;
Matthew Mongeau committed
280 281 282 283
  }
}

@-webkit-keyframes video-appear { @include video-appear-keyframes; }
284 285 286 287

@-moz-keyframes video-appear { @include video-appear-keyframes; }

@keyframes video-appear { @include video-appear-keyframes; }
288 289 290 291 292 293 294 295 296 297

// quick fade-in animation to get user attention
//************************************************************************//

.is-fading-in {
  @include animation(fade-in-animation 0.8s);
}

@mixin fade-in-keyframes {
  0% {
298
    opacity: 0;
299
  }
300

301
  100% {
302
    opacity: 1;
303 304 305
  }
}

306
@-webkit-keyframes fade-in-animation { @include fade-in-keyframes; }
307

308
@-moz-keyframes fade-in-animation { @include fade-in-keyframes; }
309

310
@keyframes fade-in-animation { @include fade-in-keyframes; }
311 312 313 314 315 316 317 318 319 320 321


// +utility animations
// --------------------
// pulse - double + fade out
@include keyframes(pulse-out) {
  0%, 100% {
    opacity: 0;
  }

  25%, 75% {
322
    opacity: 1;
323 324 325 326 327 328
  }

  100% {
    opacity: 0;
  }
}