@@ -152,12 +152,21 @@ export default {
152152@import ' docc-render/styles/_core.scss' ;
153153
154154.card {
155+ --margin-link : #{$details-padding-card } ;
155156 overflow : hidden ;
156- display : block ;
157+ display : flex ;
158+ flex-direction : column ;
157159 transition : box-shadow , transform 160ms ease-out ;
158160 will-change : box-shadow , transform ;
159161 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+ }
161170
162171 & :hover {
163172 text-decoration : none ;
@@ -182,31 +191,31 @@ export default {
182191 }
183192
184193 & .small {
185- @include static- card-size ( 408 px , 235px ) ;
194+ -- card-cover-height : 235px ;
186195 @include breakpoint (medium ) {
187- @include static- card-size ( 341 px , 163px ) ;
196+ -- card-cover-height : 163px ;
188197 }
189198 }
190199
191200 & .large {
192- @include static- card-size ( 556 px , 359px ) ;
201+ -- card-cover-height : 359px ;
193202 @include breakpoint (medium ) {
194- @include static- card-size ( 420 px , 249px ) ;
203+ -- card-cover-height : 249px ;
195204 }
196205 }
197206
198207 & .floating-style {
199208 --color-card-shadow : transparent ;
200- --card-height : auto ;
201- --card-details-height : auto ;
202209 }
203210}
204211
205212.details {
213+ flex-grow : 1 ;
214+ display : flex ;
215+ flex-direction : column ;
206216 background-color : var (--color-card-background );
207217 padding : $details-padding-card ;
208218 position : relative ;
209- height : var (--card-details-height );
210219 @include font-styles (card- content- small);
211220
212221 .large & {
@@ -241,28 +250,22 @@ export default {
241250}
242251
243252.card-content {
253+ flex-grow : 1 ;
244254 color : var (--color-card-content-text );
245255 margin-top : $content-margin-card ;
246256}
247257
248258.link {
249- bottom : $details-padding-card ;
259+ margin-top : var ( --margin-link ) ;
250260 display : flex ;
251261 align-items : center ;
252- position : absolute ;
253262
254263 .link-icon {
255264 height : 0.6em ;
256265 width : 0.6em ;
257266 // move the icon closer
258267 margin-left : .3em ;
259268 }
260-
261- .floating-style & {
262- bottom : unset ;
263- margin-top : var (--spacing-stacked-margin-large );
264- position : relative ;
265- }
266269}
267270
268271@include breakpoint (small ) {
@@ -276,9 +279,6 @@ export default {
276279 }
277280
278281 & .small , & .large {
279- --card-height : auto ;
280- --card-details-height : auto ;
281-
282282 @include inTargetWeb {
283283 min-width : 280px ;
284284 --card-cover-height : 227px ;
@@ -288,7 +288,6 @@ export default {
288288 }
289289
290290 .link {
291- bottom : unset ;
292291 margin-top : 7px ;
293292 position : relative ;
294293 }
0 commit comments