@@ -152,12 +152,21 @@ export default {
152
152
@import ' docc-render/styles/_core.scss' ;
153
153
154
154
.card {
155
+ --margin-link : #{$details-padding-card } ;
155
156
overflow : hidden ;
156
- display : block ;
157
+ display : flex ;
158
+ flex-direction : column ;
157
159
transition : box-shadow , transform 160ms ease-out ;
158
160
will-change : box-shadow , transform ;
159
161
backface-visibility : hidden ;
160
- height : var (--card-height );
162
+
163
+ & .large {
164
+ --margin-link : #{$details-padding-card * 1.5 } ;
165
+
166
+ & .floating-style {
167
+ --margin-link : var (--spacing-stacked-margin-large );
168
+ }
169
+ }
161
170
162
171
& :hover {
163
172
text-decoration : none ;
@@ -182,31 +191,31 @@ export default {
182
191
}
183
192
184
193
& .small {
185
- @include static- card-size ( 408 px , 235px ) ;
194
+ -- card-cover-height : 235px ;
186
195
@include breakpoint (medium ) {
187
- @include static- card-size ( 341 px , 163px ) ;
196
+ -- card-cover-height : 163px ;
188
197
}
189
198
}
190
199
191
200
& .large {
192
- @include static- card-size ( 556 px , 359px ) ;
201
+ -- card-cover-height : 359px ;
193
202
@include breakpoint (medium ) {
194
- @include static- card-size ( 420 px , 249px ) ;
203
+ -- card-cover-height : 249px ;
195
204
}
196
205
}
197
206
198
207
& .floating-style {
199
208
--color-card-shadow : transparent ;
200
- --card-height : auto ;
201
- --card-details-height : auto ;
202
209
}
203
210
}
204
211
205
212
.details {
213
+ flex-grow : 1 ;
214
+ display : flex ;
215
+ flex-direction : column ;
206
216
background-color : var (--color-card-background );
207
217
padding : $details-padding-card ;
208
218
position : relative ;
209
- height : var (--card-details-height );
210
219
@include font-styles (card- content- small);
211
220
212
221
.large & {
@@ -241,28 +250,22 @@ export default {
241
250
}
242
251
243
252
.card-content {
253
+ flex-grow : 1 ;
244
254
color : var (--color-card-content-text );
245
255
margin-top : $content-margin-card ;
246
256
}
247
257
248
258
.link {
249
- bottom : $details-padding-card ;
259
+ margin-top : var ( --margin-link ) ;
250
260
display : flex ;
251
261
align-items : center ;
252
- position : absolute ;
253
262
254
263
.link-icon {
255
264
height : 0.6em ;
256
265
width : 0.6em ;
257
266
// move the icon closer
258
267
margin-left : .3em ;
259
268
}
260
-
261
- .floating-style & {
262
- bottom : unset ;
263
- margin-top : var (--spacing-stacked-margin-large );
264
- position : relative ;
265
- }
266
269
}
267
270
268
271
@include breakpoint (small ) {
@@ -276,9 +279,6 @@ export default {
276
279
}
277
280
278
281
& .small , & .large {
279
- --card-height : auto ;
280
- --card-details-height : auto ;
281
-
282
282
@include inTargetWeb {
283
283
min-width : 280px ;
284
284
--card-cover-height : 227px ;
@@ -288,7 +288,6 @@ export default {
288
288
}
289
289
290
290
.link {
291
- bottom : unset ;
292
291
margin-top : 7px ;
293
292
position : relative ;
294
293
}
0 commit comments