Commit 37e2ad53 authored by Roman Aleksandrov's avatar Roman Aleksandrov Committed by Commit Bot

oobe-carousel: Update motion according to mocks.

Bug: 1123899
Change-Id: Iecb14a15c714126b8eab2198368efc0ebe22d493
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2387022
Commit-Queue: Roman Aleksandrov <raleksandrov@google.com>
Reviewed-by: default avatarRoman Sorokin [CET] <rsorokin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803837}
parent 24ac21d4
...@@ -62,9 +62,9 @@ ...@@ -62,9 +62,9 @@
} }
::slotted(.animated) { ::slotted(.animated) {
/* cubic-bezier(.51, .92, .24, 1) makes animation of transition similar /* cubic-bezier(0.6, 0.0, 0.0, 1.0) makes animation of transition
to basic slide rotation. */ similar to basic slide rotation. */
transition: transform 1.0s cubic-bezier(.51, .92, .24, 1); transition: transform 500ms cubic-bezier(0.6, 0, 0, 1.0);
} }
::slotted(.backward) { ::slotted(.backward) {
...@@ -75,6 +75,16 @@ ...@@ -75,6 +75,16 @@
transform: var(--oobe-forward-slide-animation); transform: var(--oobe-forward-slide-animation);
} }
::slotted(.hide-slide) {
animation: 500ms ease 0s normal forwards 1 slide-fadeout;
}
@keyframes slide-fadeout {
0% { opacity: 1.0; }
60% { opacity: 1.0; } /* Starts animation at 0.6 * 0.5s = 0.3s. */
100% { opacity: 0; }
}
.buttons { .buttons {
height: 20px; height: 20px;
margin-inline-end: 0; margin-inline-end: 0;
...@@ -88,7 +98,8 @@ ...@@ -88,7 +98,8 @@
height: 10px; height: 10px;
margin: 5px; margin: 5px;
pointer-events: none; pointer-events: none;
transition: background 1s; transition: background 200ms;
transition-delay: 100ms;
width: 10px; width: 10px;
} }
.slider-dot[active] { .slider-dot[active] {
......
...@@ -195,9 +195,7 @@ Polymer({ ...@@ -195,9 +195,7 @@ Polymer({
* @param {EventTarget|null} slide * @param {EventTarget|null} slide
*/ */
cleanStyles(slide) { cleanStyles(slide) {
slide.classList.remove('animated'); slide.classList.remove('animated', 'forward', 'backward', 'hide-slide');
slide.classList.remove('forward');
slide.classList.remove('backward');
}, },
/** /**
...@@ -271,6 +269,7 @@ Polymer({ ...@@ -271,6 +269,7 @@ Polymer({
fromElement.classList.add('animated'); fromElement.classList.add('animated');
toElement.classList.remove(toStyle); toElement.classList.remove(toStyle);
fromElement.classList.add(fromStyle); fromElement.classList.add(fromStyle);
fromElement.classList.add('hide-slide');
toElement.addEventListener('transitionend', this.removeAnimateToHandler); toElement.addEventListener('transitionend', this.removeAnimateToHandler);
fromElement.addEventListener( fromElement.addEventListener(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment