mirror of
https://github.com/flarum/core.git
synced 2025-07-30 21:20:24 +02:00
Refactor PostStream animations (#2364)
- If the fadeIn animation is specified on the PostStream class itself, any time we add/remove another animation, it will redo fadeIn. To avoid this, we move fadeIn into it's own css class, which is applied, and then immediately removed after the animation is completed to ensure it only runs once. - The "fix" for flashItem was actually broken, as it resulted in 'flash' never being removed, so we never went back to .PostStream's fadeIn. We adjust flashItem to ensure that '.flash' is removed. We also remove 'fadeIn' in case it hasn't yet been removed in oncreate.
This commit is contained in:
committed by
GitHub
parent
8546fb734f
commit
543b136f7c
@@ -6,18 +6,7 @@
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes fadeIn {
|
||||
0% {opacity: 0}
|
||||
100% {opacity: 1}
|
||||
}
|
||||
@keyframes fadeIn {
|
||||
0% {opacity: 0}
|
||||
100% {opacity: 1}
|
||||
}
|
||||
.PostStream-item {
|
||||
.animation(fadeIn 0.4s ease-in-out);
|
||||
|
||||
&:not(:last-child) {
|
||||
border-bottom: 1px solid @control-bg;
|
||||
|
||||
@@ -104,3 +93,16 @@
|
||||
.animation(pulsate 0.2s ease-in-out);
|
||||
.animation-iteration-count(1);
|
||||
}
|
||||
|
||||
@-webkit-keyframes fadeIn {
|
||||
0% {opacity: 0}
|
||||
100% {opacity: 1}
|
||||
}
|
||||
@keyframes fadeIn {
|
||||
0% {opacity: 0}
|
||||
100% {opacity: 1}
|
||||
}
|
||||
.fadeIn {
|
||||
.animation(fadeIn 0.4s ease-in-out);
|
||||
.animation-iteration-count(1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user