cleaner mobile animation
This commit is contained in:
parent
3ba38ee3b7
commit
c853e9795e
6 changed files with 120 additions and 51 deletions
|
|
@ -5,8 +5,6 @@ body {
|
|||
margin-right: 0px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.blurred {
|
||||
filter: blur(5px);
|
||||
|
||||
|
|
@ -19,7 +17,6 @@ body {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
.bounce {
|
||||
-moz-animation: bounce 2s 10;
|
||||
-webkit-animation: bounce 2s 10;
|
||||
|
|
|
|||
|
|
@ -110,29 +110,49 @@
|
|||
}
|
||||
|
||||
.sub.item {
|
||||
display: block;
|
||||
|
||||
padding-left: 3rem;
|
||||
background-color: lighten($background, 15%);
|
||||
|
||||
display: none;
|
||||
height: 0;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
-moz-animation: disappear 250ms 1;
|
||||
-webkit-animation: disappear 250ms 1;
|
||||
animation: disappear 250ms 1;
|
||||
|
||||
transition-duration: 200ms, 200ms;
|
||||
transition-property: visibility, opacity;
|
||||
// USE HEIGHT TO ANIMATE
|
||||
max-height: 0;
|
||||
|
||||
&.visible {
|
||||
display: inline-flex;
|
||||
height: 4rem;
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
transition-duration: 200ms, 0;
|
||||
transition-property: opacity, visibility;
|
||||
transition-delay: 0, 200ms;
|
||||
|
||||
// USE HEIGHT TO ANIMATE
|
||||
max-height: 4rem;
|
||||
|
||||
-moz-animation: appear 250ms 1;
|
||||
-webkit-animation: appear 250ms 1;
|
||||
animation: appear 250ms 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes appear {
|
||||
0% {
|
||||
max-height: 0;
|
||||
}
|
||||
100% {
|
||||
max-height: 4rem;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes disappear {
|
||||
0% {
|
||||
max-height: 4rem;
|
||||
}
|
||||
100% {
|
||||
max-height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.no-scroll {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -735,31 +735,57 @@ body {
|
|||
}
|
||||
|
||||
.mobile-menu .sub.item {
|
||||
display: block;
|
||||
padding-left: 3rem;
|
||||
background-color: #4b4b4b;
|
||||
display: none;
|
||||
height: 0;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
-webkit-transition-duration: 200ms, 200ms;
|
||||
transition-duration: 200ms, 200ms;
|
||||
-webkit-transition-property: visibility, opacity;
|
||||
transition-property: visibility, opacity;
|
||||
-webkit-animation: disappear 250ms 1;
|
||||
animation: disappear 250ms 1;
|
||||
max-height: 0;
|
||||
}
|
||||
|
||||
.mobile-menu .sub.item.visible {
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
display: inline-flex;
|
||||
height: 4rem;
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
-webkit-transition-duration: 200ms, 0;
|
||||
transition-duration: 200ms, 0;
|
||||
-webkit-transition-property: opacity, visibility;
|
||||
transition-property: opacity, visibility;
|
||||
-webkit-transition-delay: 0, 200ms;
|
||||
transition-delay: 0, 200ms;
|
||||
max-height: 4rem;
|
||||
-webkit-animation: appear 250ms 1;
|
||||
animation: appear 250ms 1;
|
||||
}
|
||||
|
||||
@-webkit-keyframes appear {
|
||||
0% {
|
||||
max-height: 0;
|
||||
}
|
||||
100% {
|
||||
max-height: 4rem;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes appear {
|
||||
0% {
|
||||
max-height: 0;
|
||||
}
|
||||
100% {
|
||||
max-height: 4rem;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes disappear {
|
||||
0% {
|
||||
max-height: 4rem;
|
||||
}
|
||||
100% {
|
||||
max-height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes disappear {
|
||||
0% {
|
||||
max-height: 4rem;
|
||||
}
|
||||
100% {
|
||||
max-height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.no-scroll {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -735,31 +735,57 @@ body {
|
|||
}
|
||||
|
||||
.mobile-menu .sub.item {
|
||||
display: block;
|
||||
padding-left: 3rem;
|
||||
background-color: white;
|
||||
display: none;
|
||||
height: 0;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
-webkit-transition-duration: 200ms, 200ms;
|
||||
transition-duration: 200ms, 200ms;
|
||||
-webkit-transition-property: visibility, opacity;
|
||||
transition-property: visibility, opacity;
|
||||
-webkit-animation: disappear 250ms 1;
|
||||
animation: disappear 250ms 1;
|
||||
max-height: 0;
|
||||
}
|
||||
|
||||
.mobile-menu .sub.item.visible {
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
display: inline-flex;
|
||||
height: 4rem;
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
-webkit-transition-duration: 200ms, 0;
|
||||
transition-duration: 200ms, 0;
|
||||
-webkit-transition-property: opacity, visibility;
|
||||
transition-property: opacity, visibility;
|
||||
-webkit-transition-delay: 0, 200ms;
|
||||
transition-delay: 0, 200ms;
|
||||
max-height: 4rem;
|
||||
-webkit-animation: appear 250ms 1;
|
||||
animation: appear 250ms 1;
|
||||
}
|
||||
|
||||
@-webkit-keyframes appear {
|
||||
0% {
|
||||
max-height: 0;
|
||||
}
|
||||
100% {
|
||||
max-height: 4rem;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes appear {
|
||||
0% {
|
||||
max-height: 0;
|
||||
}
|
||||
100% {
|
||||
max-height: 4rem;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes disappear {
|
||||
0% {
|
||||
max-height: 4rem;
|
||||
}
|
||||
100% {
|
||||
max-height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes disappear {
|
||||
0% {
|
||||
max-height: 4rem;
|
||||
}
|
||||
100% {
|
||||
max-height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.no-scroll {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue