@@ -15,19 +15,23 @@ const enter = keyframes({
15
15
transform : "translateY(-50px)" ,
16
16
clipPath : `inset(0 0 100% 0 round ${ THEME . shape . corner . extraLarge } )` ,
17
17
} ,
18
+ to : {
19
+ clipPath : `inset(0 0 0 0 round ${ THEME . shape . corner . extraLarge } )` ,
20
+ } ,
18
21
} ) ;
19
22
const exit = keyframes ( {
23
+ from : {
24
+ clipPath : `inset(0 0 0 0 round ${ THEME . shape . corner . extraLarge } )` ,
25
+ } ,
20
26
to : {
21
27
transform : "translateY(-50px)" ,
22
28
clipPath : `inset(0 0 65% 0 round ${ THEME . shape . corner . extraLarge } )` ,
23
29
} ,
24
30
} ) ;
25
31
const fadeIn = keyframes ( {
26
32
from : { opacity : 0 } ,
27
- // to: { opacity: 1 },
28
33
} ) ;
29
34
const fadeOut = keyframes ( {
30
- // from: { opacity: 1 },
31
35
to : { opacity : 0 } ,
32
36
} ) ;
33
37
@@ -36,6 +40,24 @@ const scrim = recipe({
36
40
backgroundColor : THEME . color . scrim ,
37
41
opacity : 0.32 ,
38
42
} ,
43
+ variants : {
44
+ entering : {
45
+ true : {
46
+ animationName : fadeIn ,
47
+ animationDuration : THEME . motion . duration . long2 ,
48
+ animationTimingFunction : THEME . motion . easing . linear ,
49
+ animationFillMode : "both" ,
50
+ } ,
51
+ } ,
52
+ exiting : {
53
+ true : {
54
+ animationName : fadeOut ,
55
+ animationDuration : THEME . motion . duration . short3 ,
56
+ animationTimingFunction : THEME . motion . easing . linear ,
57
+ animationFillMode : "forwards" ,
58
+ } ,
59
+ } ,
60
+ } ,
39
61
} ) ;
40
62
41
63
const container = recipe ( {
@@ -53,9 +75,10 @@ const container = recipe({
53
75
flexDirection : "column" ,
54
76
overflow : "hidden" ,
55
77
78
+ borderRadius : THEME . shape . corner . extraLarge ,
56
79
backgroundColor : THEME . color . surfaceContainerHighest ,
57
80
58
- clipPath : `inset(0 0 0 0 round ${ THEME . shape . corner . extraLarge } )` ,
81
+ // clipPath: `inset(0 0 0 0 round ${THEME.shape.corner.extraLarge})`,
59
82
60
83
// TODO: doesn't work because of clip-path
61
84
// boxShadow: `
@@ -93,6 +116,7 @@ const headline = recipe({
93
116
display : "flex" ,
94
117
flexDirection : "column" ,
95
118
alignItems : "center" ,
119
+ paddingBlockEnd : 16 ,
96
120
97
121
...THEME . typescale . headline . small ,
98
122
color : THEME . color . onSurface ,
@@ -147,8 +171,19 @@ const headlineText = style({
147
171
148
172
const content = recipe ( {
149
173
base : {
174
+ position : "relative" ,
175
+ height : "min-content" ,
176
+ flex : 1 ,
177
+
178
+ paddingInline : 24 ,
179
+
150
180
...THEME . typescale . body . medium ,
151
181
color : THEME . color . onSurfaceVariant ,
182
+
183
+
184
+ // flex: 1;
185
+ // height: min-content; // Needed for Safari
186
+ // position: relative;
152
187
} ,
153
188
variants : {
154
189
entering : {
@@ -192,7 +227,7 @@ const actions = recipe({
192
227
gap : 8 ,
193
228
194
229
paddingInline : 24 ,
195
- paddingBlock : "16px 24px" ,
230
+ paddingBlock : 24 ,
196
231
} ,
197
232
variants : {
198
233
entering : {
0 commit comments