Clean up unused and speed up animations, fix sidebar transitions

This commit is contained in:
Tautvidas Sipavičius
2016-01-05 17:32:59 +02:00
parent c844488b0b
commit bbe2f69a7f
6 changed files with 12 additions and 41 deletions

View File

@@ -85,7 +85,6 @@ $layer-selector-width = 30px
max-width: 100%
display: inline-block
opacity: 1
animation-fade-in-and-scale-horizontally()
.mailpoet_delete_block_confirm,
.mailpoet_delete_block_cancel

View File

@@ -52,7 +52,7 @@ $draggable-widget-z-index = 2
padding: 0
margin: 0
z-index: $draggable-widget-z-index
animation-fade-in-and-scale-up()
animation-fade-in()
.mailpoet_widget_icon
padding: 0

View File

@@ -27,14 +27,14 @@ $widget-icon-width = 30px
&.closed .mailpoet_region_content
max-height: 0px
overflow: hidden
margin-top: 0
.mailpoet_region_content
max-height: 100%
transition: max-height 350ms ease
max-height: 5000px
transition: max-height 400ms ease
padding: 0 20px
margin-top: 12px
overflow: hidden
&, .postbox
background-color: $sidebar-background-color

View File

@@ -30,8 +30,3 @@ $block-hover-highlight-color = $primary-active-color
.mailpoet_content
position: relative
.mailpoet_block_transition_in
animation-fade-in-and-scale-up()
.mailpoet_block_transition_out
animation-fade-out-and-scale-down()

View File

@@ -1,5 +1,5 @@
animation-slide-open-downwards()
transition: all 300ms cubic-bezier(0.420, 0.000, 0.580, 1.000) /* ease-in-out */
transition: all 250ms cubic-bezier(0.420, 0.000, 0.580, 1.000) /* ease-in-out */
max-height: 2000px
opacity: 1
@@ -9,45 +9,22 @@ animation-slide-open-downwards()
overflow-y: hidden
animation-background-color()
transition: background 300ms cubic-bezier(0.420, 0.000, 0.580, 1.000) /* ease-in-out */
transition: background 250ms cubic-bezier(0.420, 0.000, 0.580, 1.000) /* ease-in-out */
animation-fade-in-and-scale-up()
animation-name: fadeInAndScaleUp
animation-duration: 500ms
animation-fill-mode: forwards
animation-fade-out-and-scale-down()
animation-name: fadeOutAndScaleDown
animation-duration: 500ms
animation-fade-in()
animation-name: fadeIn
animation-duration: 250ms
animation-fill-mode: forwards
animation-fade-in-and-scale-horizontally()
transition: all 300ms cubic-bezier(0.420, 0.000, 0.580, 1.000) /* ease-in-out */
transition: all 250ms cubic-bezier(0.420, 0.000, 0.580, 1.000) /* ease-in-out */
@keyframes fadeInAndScaleUp {
@keyframes fadeIn {
0% {
opacity: 0.3
max-height: 0
overflow: hidden
}
100% {
opacity: 1
max-height: 5000px
overflow: hidden
}
}
@keyframes fadeOutAndScaleDown {
0% {
opacity: 1
max-height: 5000px
overflow: hidden
}
100% {
opacity: 0.3
max-height: 0
overflow: hidden
}
}