debian-mirror-gitlab/app/assets/stylesheets/framework/animations.scss

263 lines
5.2 KiB
SCSS
Raw Normal View History

2016-06-02 11:05:42 +05:30
// This file is based off animate.css 3.5.1, available here:
// https://github.com/daneden/animate.css/blob/3.5.1/animate.css
2017-08-17 22:00:37 +05:30
//
2016-06-02 11:05:42 +05:30
// animate.css - http://daneden.me/animate
// Version - 3.5.1
// Licensed under the MIT license - http://opensource.org/licenses/MIT
2017-08-17 22:00:37 +05:30
//
2016-06-02 11:05:42 +05:30
// Copyright (c) 2016 Daniel Eden
.animated {
2016-09-29 09:46:39 +05:30
@include webkit-prefix(animation-duration, 1s);
@include webkit-prefix(animation-fill-mode, both);
2016-06-02 11:05:42 +05:30
2016-09-29 09:46:39 +05:30
&.infinite {
@include webkit-prefix(animation-iteration-count, infinite);
}
2016-06-02 11:05:42 +05:30
2016-09-29 09:46:39 +05:30
&.once {
@include webkit-prefix(animation-iteration-count, 1);
}
2016-06-02 11:05:42 +05:30
2016-09-29 09:46:39 +05:30
&.hinge {
@include webkit-prefix(animation-duration, 2s);
2016-06-02 11:05:42 +05:30
}
2016-09-29 09:46:39 +05:30
&.flipOutX,
&.flipOutY,
&.bounceIn,
&.bounceOut {
@include webkit-prefix(animation-duration, .75s);
2016-06-02 11:05:42 +05:30
}
2016-09-29 09:46:39 +05:30
&.short {
@include webkit-prefix(animation-duration, 321ms);
@include webkit-prefix(animation-fill-mode, none);
2016-06-02 11:05:42 +05:30
}
}
2016-09-29 09:46:39 +05:30
@include keyframes(pulse) {
2017-08-17 22:00:37 +05:30
from,
to {
2016-09-29 09:46:39 +05:30
@include webkit-prefix(transform, scale3d(1, 1, 1));
2016-06-02 11:05:42 +05:30
}
50% {
2016-09-29 09:46:39 +05:30
@include webkit-prefix(transform, scale3d(1.05, 1.05, 1.05));
2016-06-02 11:05:42 +05:30
}
}
.pulse {
2016-09-29 09:46:39 +05:30
@include webkit-prefix(animation-name, pulse);
2016-06-02 11:05:42 +05:30
}
2017-08-17 22:00:37 +05:30
/*
* General hover animations
*/
// Sass multiple transitions mixin | https://gist.github.com/tobiasahlin/7a421fb9306a4f518aab
// Usage: @include transition(width, height 0.3s ease-in-out);
// Output: -webkit-transition(width 0.2s, height 0.3s ease-in-out);
// transition(width 0.2s, height 0.3s ease-in-out);
//
// Pass in any number of transitions
@mixin transition($transitions...) {
$unfoldedTransitions: ();
@each $transition in $transitions {
$unfoldedTransitions: append($unfoldedTransitions, unfoldTransition($transition), comma);
}
transition: $unfoldedTransitions;
}
@mixin disableAllAnimation {
/*CSS transitions*/
-o-transition-property: none !important;
-moz-transition-property: none !important;
-ms-transition-property: none !important;
-webkit-transition-property: none !important;
transition-property: none !important;
/*CSS transforms*/
-o-transform: none !important;
-moz-transform: none !important;
-ms-transform: none !important;
-webkit-transform: none !important;
transform: none !important;
/*CSS animations*/
-webkit-animation: none !important;
-moz-animation: none !important;
-o-animation: none !important;
-ms-animation: none !important;
animation: none !important;
}
@function unfoldTransition ($transition) {
// Default values
$property: all;
$duration: $general-hover-transition-duration;
$easing: $general-hover-transition-curve; // Browser default is ease, which is what we want
$delay: null; // Browser default is 0, which is what we want
$defaultProperties: ($property, $duration, $easing, $delay);
// Grab transition properties if they exist
$unfoldedTransition: ();
@for $i from 1 through length($defaultProperties) {
$p: null;
@if $i <= length($transition) {
$p: nth($transition, $i);
} @else {
$p: nth($defaultProperties, $i);
}
$unfoldedTransition: append($unfoldedTransition, $p);
}
@return $unfoldedTransition;
}
2018-03-17 18:26:18 +05:30
.btn {
2017-08-17 22:00:37 +05:30
@include transition(background-color, border-color, color, box-shadow);
}
.dropdown-menu-toggle,
.avatar-circle,
.header-user-avatar {
@include transition(border-color);
}
2018-03-17 18:26:18 +05:30
.note-action-button,
2017-08-17 22:00:37 +05:30
.toolbar-btn,
.dropdown-toggle-caret {
@include transition(color);
}
a {
@include transition(background-color, color, border);
}
.stage-nav-item {
@include transition(background-color, box-shadow);
}
.dropdown-menu a,
.dropdown-menu button,
.dropdown-menu-nav a {
transition: none;
}
@keyframes fadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.fade-in {
animation: fadeIn $fade-in-duration 1;
}
@keyframes fadeInHalf {
0% {
opacity: 0;
}
100% {
opacity: 0.5;
}
}
.fade-in-half {
animation: fadeInHalf $fade-in-duration 1;
}
@keyframes fadeInFull {
0% {
opacity: 0.5;
}
100% {
opacity: 1;
}
}
.fade-in-full {
animation: fadeInFull $fade-in-duration 1;
}
2017-09-10 17:25:29 +05:30
.animation-container {
height: 40px;
overflow: hidden;
&.animation-container-small {
height: 12px;
}
2018-03-17 18:26:18 +05:30
&.animation-container-right {
.skeleton-line-2 {
left: 0;
right: 150px;
}
}
2017-09-10 17:25:29 +05:30
2018-05-09 12:01:36 +05:30
[class^="skeleton-line-"] {
2017-09-10 17:25:29 +05:30
position: relative;
2018-05-09 12:01:36 +05:30
background-color: $theme-gray-100;
2017-09-10 17:25:29 +05:30
height: 10px;
2018-05-09 12:01:36 +05:30
overflow: hidden;
2017-09-10 17:25:29 +05:30
2018-05-09 12:01:36 +05:30
&:not(:last-of-type) {
margin-bottom: 4px;
}
2017-09-10 17:25:29 +05:30
2018-05-09 12:01:36 +05:30
&::after {
content: ' ';
display: block;
animation: blockTextShine 1s linear infinite forwards;
background-repeat: no-repeat;
background-size: cover;
background-image: linear-gradient(
to right,
$theme-gray-100 0%,
$theme-gray-50 20%,
$theme-gray-100 40%,
$theme-gray-100 100%
);
height: 10px;
}
2017-09-10 17:25:29 +05:30
}
2018-05-09 12:01:36 +05:30
}
2017-09-10 17:25:29 +05:30
2018-05-09 12:01:36 +05:30
$skeleton-line-widths: (
156px,
235px,
200px,
);
2017-09-10 17:25:29 +05:30
2018-05-09 12:01:36 +05:30
@for $count from 1 through length($skeleton-line-widths) {
.skeleton-line-#{$count} {
width: nth($skeleton-line-widths, $count);
2017-09-10 17:25:29 +05:30
}
}
@keyframes blockTextShine {
0% {
transform: translateX(-468px);
}
100% {
transform: translateX(468px);
}
}
2018-11-08 19:23:39 +05:30
.slide-down-enter-active {
transition: transform 0.2s;
}
.slide-down-enter,
.slide-down-leave-to {
transform: translateY(-30%);
}