1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-12-17 16:18:23 +09:00
MisskeyIO/src/client/components/sequential-entrance.vue

41 lines
704 B
Vue
Raw Normal View History

<template>
2020-02-06 19:11:14 +09:00
<transition-group v-if="$store.state.device.animation"
2020-02-15 18:39:45 +09:00
class="uupnnhew"
name="staggered"
tag="div"
appear
>
<slot></slot>
</transition-group>
2020-02-06 19:11:14 +09:00
<div v-else>
<slot></slot>
</div>
</template>
<script lang="ts">
import Vue from 'vue';
export default Vue.extend({
methods: {
focus() {
this.$slots.default[0].elm.focus();
}
2020-02-15 18:39:45 +09:00
},
});
</script>
<style lang="scss">
2020-02-21 09:11:35 +09:00
.uupnnhew {
> .staggered-enter {
2020-02-15 18:39:45 +09:00
opacity: 0;
transform: translateY(-64px);
}
@for $i from 1 through 30 {
2020-02-21 09:11:35 +09:00
> .staggered-enter-active:nth-child(#{$i}) {
2020-02-15 18:42:43 +09:00
transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1) (15ms * ($i - 1)), opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1) (15ms * ($i - 1));
2020-02-15 18:39:45 +09:00
}
}
}
</style>