mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
When routing between two different routes, child animations were not finishing, causing elements to be left behind in the dom. The fix ensures the proper fallback is handled to avoid automatically cancelled custom events. This ensures the animation-fallback cancelling the animation actually completes, and ensures the element is removed.
fixes: #67400
(cherry picked from commit 9e64147b73)
95 lines
1.6 KiB
CSS
95 lines
1.6 KiB
CSS
.example-list {
|
|
width: 500px;
|
|
max-width: 100%;
|
|
border: solid 1px #ccc;
|
|
min-height: 60px;
|
|
display: block;
|
|
background: white;
|
|
border-radius: 4px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.example-box {
|
|
padding: 20px 10px;
|
|
border-bottom: solid 1px #ccc;
|
|
color: rgba(0, 0, 0, 0.87);
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
box-sizing: border-box;
|
|
cursor: move;
|
|
background: white;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.cdk-drag-preview {
|
|
box-sizing: border-box;
|
|
border-radius: 4px;
|
|
box-shadow:
|
|
0 5px 5px -3px rgba(0, 0, 0, 0.2),
|
|
0 8px 10px 1px rgba(0, 0, 0, 0.14),
|
|
0 3px 14px 2px rgba(0, 0, 0, 0.12);
|
|
}
|
|
|
|
.cdk-drag-placeholder {
|
|
opacity: 0;
|
|
}
|
|
|
|
.cdk-drag-animating {
|
|
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
|
|
}
|
|
|
|
.example-box:last-child {
|
|
border: none;
|
|
}
|
|
|
|
.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder) {
|
|
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
|
|
}
|
|
|
|
.example-custom-placeholder {
|
|
background: #ccc;
|
|
border: dotted 3px #999;
|
|
min-height: 60px;
|
|
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
|
|
}
|
|
|
|
.ease-in-animation {
|
|
animation: ease-in-animation 1500ms;
|
|
}
|
|
|
|
.ease-out-animation {
|
|
animation: ease-out-animation 1500ms;
|
|
}
|
|
|
|
@keyframes ease-in-animation {
|
|
from {
|
|
height: 0;
|
|
}
|
|
to {
|
|
height: 75px;
|
|
}
|
|
}
|
|
|
|
@keyframes ease-out-animation {
|
|
from {
|
|
height: 75px;
|
|
}
|
|
to {
|
|
height: 0;
|
|
}
|
|
}
|
|
|
|
.short-animation {
|
|
animation: short-animation 50ms;
|
|
}
|
|
|
|
@keyframes short-animation {
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
}
|