- Start Date: 2019-11-29
- Target Major Version: 3.x
- Reference Issues: N/A
- Implementation PR: N/A
- Rename the
v-enter
transition class tov-enter-from
- Rename the
v-leave
transition class tov-leave-from
- Rename the
v-appear
transition class tov-appear-from
/* before */
.v-enter, .v-leave-to{
opacity: 0;
}
/* after */
.v-enter-from, .v-leave-to{
opacity: 0;
}
Before v2.1.8, we only had two transition classes each transition direction. For example for the enter transition, we had v-enter
and v-enter-active
. In v2.1.8, we introduced v-enter-to
to address the timing gap between enter/leave transitions, however, for backwards compatibility the v-enter
name was untouched:
.v-enter, .v-leave-to {
opacity: 0;
}
.v-leave, .v-enter-to {
opacity: 1
}
The asymmetry and lack of explicitness in .v-enter
and .v-leave
makes these classes a bit mind bending to read and understand. This is why we are proposing to change the above to:
.v-enter-from, .v-leave-to {
opacity: 0;
}
.v-leave-from, .v-enter-to {
opacity: 1
}
...which better indicates what state these classes apply to.
.v-enter
is renamed to.v-enter-from
.v-leave
is renamed to.v-leave-from
.v-appear
is renamed to.v-appear-from
- The
<transition>
component's related prop names are also changed:leave-class
is renamed toleave-from-class
(in render functions or JSX, can be written asleaveFromClass
)enter-class
is renamed toenter-from-class
(in render functions or JSX, can be written asenterFromClass
)appear-class
is renamed toappear-from-class
(in render functions or JSX, can be written asappearFromClass
)
Old class names can be easily supported in the compat build, with warnings to guide migration.