File tree Expand file tree Collapse file tree 2 files changed +25
-9
lines changed Expand file tree Collapse file tree 2 files changed +25
-9
lines changed Original file line number Diff line number Diff line change 24
24
25
25
/* Fade out, then fade in transition */
26
26
27
- .fade-wait-leave {
27
+ .fade-wait-leave ,
28
+ .fade-wait-delay-leave {
28
29
opacity : 1 ;
29
30
}
30
- .fade-wait-leave .fade-wait-leave-active {
31
+ .fade-wait-leave .fade-wait-leave-active ,
32
+ .fade-wait-delay-leave .fade-wait-delay-leave-active {
31
33
opacity : 0 ;
32
34
transition : opacity .4s ease-in;
33
35
}
34
36
35
- .fade-wait-enter {
37
+ .fade-wait-enter ,
38
+ .fade-wait-delay-enter {
36
39
opacity : 0 ;
37
40
}
38
- .fade-wait-enter .fade-wait-enter-active {
41
+ .fade-wait-enter .fade-wait-enter-active ,
42
+ .fade-wait-delay-enter .fade-wait-delay-enter-active {
39
43
opacity : 1 ;
40
44
/* Delay the enter animation until the leave completes */
41
- transition : opacity .4s ease-in .6 s ;
45
+ transition : opacity .4s ease-in .4 s ;
42
46
}
43
47
44
48
.fade-wait-height {
45
- transition : height .6s ease-in-out;
49
+ transition : height .8s ease-in-out;
50
+ }
51
+ .fade-wait-delay-height {
52
+ /* Delay the height animation until the leave completes */
53
+ transition : height .4s ease-in-out .4s ;
46
54
}
47
55
48
56
Original file line number Diff line number Diff line change @@ -56,16 +56,24 @@ class Demo extends React.Component {
56
56
</ ContentSwapper >
57
57
58
58
< h3 id = "fade-wait" > Fade out, then fade in transition</ h3 >
59
- < p > The < code > opacity</ code > transition for < code > enter</ code > animation is delayed until after
60
- the < code > leave</ code > transition completes. View the < a
59
+ < p > For the first paragraph the < code > opacity</ code > transition for < code > enter</ code > animation is delayed
60
+ until after the < code > leave</ code > transition completes. View the < a
61
61
href = "https://github.com/marnusw/react-css-transition-replace#fade-out-then-fade-in"
62
- target = "_blank" > CSS</ a > .</ p >
62
+ target = "_blank" > CSS</ a > .< br /> For the second paragraph both the enter and height transitions
63
+ are delayed.</ p >
63
64
64
65
< ContentSwapper transitionName = "fade-wait" transitionEnterTimeout = { 1000 } transitionLeaveTimeout = { 400 } >
65
66
< ContentLong key = "long" />
66
67
< ContentShort key = "short" />
67
68
</ ContentSwapper >
68
69
70
+ < br />
71
+
72
+ < ContentSwapper transitionName = "fade-wait-delay" transitionEnterTimeout = { 1000 } transitionLeaveTimeout = { 400 } >
73
+ < ContentLong key = "long" />
74
+ < ContentShort key = "short" />
75
+ </ ContentSwapper >
76
+
69
77
< h3 id = "carousel-swap" > Carousel transition</ h3 >
70
78
< p > The slide animation is realised with a 2D CSS < code > transform</ code > . View the < a
71
79
href = "transitions.css" target = "_blank" > CSS source</ a > . To ensure the entering/leaving
You can’t perform that action at this time.
0 commit comments