Skip to content

Commit 89c6a28

Browse files
authored
fix(card): update link to take full width of footer (#3116)
1 parent 0fa0165 commit 89c6a28

File tree

2 files changed

+32
-11
lines changed

2 files changed

+32
-11
lines changed

ui/components/cards/base/_index.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,15 @@
8888
}
8989
}
9090

91+
/**
92+
* @summary Actionable element within card footer
93+
* @selector .slds-card__footer-action
94+
* @restrict .slds-card__footer a
95+
*/
96+
.slds-card__footer-action {
97+
display: block;
98+
}
99+
91100
/**
92101
* Use class if card consumes any form of a tile
93102
*

ui/components/cards/base/example.jsx

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ export let examples = [
214214
</table>
215215
</CardBody>
216216
<CardFooter>
217-
<a href="javascript:void(0);">
217+
<a className="slds-card__footer-action" href="javascript:void(0);">
218218
View All <span className="slds-assistive-text">entity type</span>
219219
</a>
220220
</CardFooter>
@@ -276,7 +276,7 @@ export let examples = [
276276
</ul>
277277
</CardBody>
278278
<CardFooter>
279-
<a href="javascript:void(0);">
279+
<a className="slds-card__footer-action" href="javascript:void(0);">
280280
View All <span className="slds-assistive-text">entity type</span>
281281
</a>
282282
</CardFooter>
@@ -303,7 +303,10 @@ export let examples = [
303303
</p>
304304
</CardBody>
305305
<CardFooter>
306-
<a href="javascript:void(0);">
306+
<a
307+
className="slds-card__footer-action"
308+
href="javascript:void(0);"
309+
>
307310
View All{' '}
308311
<span className="slds-assistive-text">entity type</span>
309312
</a>
@@ -320,7 +323,10 @@ export let examples = [
320323
</p>
321324
</CardBody>
322325
<CardFooter>
323-
<a href="javascript:void(0);">
326+
<a
327+
className="slds-card__footer-action"
328+
href="javascript:void(0);"
329+
>
324330
View All{' '}
325331
<span className="slds-assistive-text">entity type</span>
326332
</a>
@@ -337,7 +343,10 @@ export let examples = [
337343
</p>
338344
</CardBody>
339345
<CardFooter>
340-
<a href="javascript:void(0);">
346+
<a
347+
className="slds-card__footer-action"
348+
href="javascript:void(0);"
349+
>
341350
View All{' '}
342351
<span className="slds-assistive-text">entity type</span>
343352
</a>
@@ -354,15 +363,18 @@ export let examples = [
354363
</p>
355364
</CardBody>
356365
<CardFooter>
357-
<a href="javascript:void(0);">
366+
<a
367+
className="slds-card__footer-action"
368+
href="javascript:void(0);"
369+
>
358370
View All{' '}
359371
<span className="slds-assistive-text">entity type</span>
360372
</a>
361373
</CardFooter>
362374
</Card>
363375
</CardBody>
364376
<CardFooter>
365-
<a href="javascript:void(0);">
377+
<a className="slds-card__footer-action" href="javascript:void(0);">
366378
View All <span className="slds-assistive-text">entity type</span>
367379
</a>
368380
</CardFooter>
@@ -390,7 +402,7 @@ export let examples = [
390402
</p>
391403
</CardBody>
392404
<CardFooter>
393-
<a href="javascript:void(0);">
405+
<a className="slds-card__footer-action" href="javascript:void(0);">
394406
View All <span className="slds-assistive-text">entity type</span>
395407
</a>
396408
</CardFooter>
@@ -406,7 +418,7 @@ export let examples = [
406418
</p>
407419
</CardBody>
408420
<CardFooter>
409-
<a href="javascript:void(0);">
421+
<a className="slds-card__footer-action" href="javascript:void(0);">
410422
View All <span className="slds-assistive-text">entity type</span>
411423
</a>
412424
</CardFooter>
@@ -422,7 +434,7 @@ export let examples = [
422434
</p>
423435
</CardBody>
424436
<CardFooter>
425-
<a href="javascript:void(0);">
437+
<a className="slds-card__footer-action" href="javascript:void(0);">
426438
View All <span className="slds-assistive-text">entity type</span>
427439
</a>
428440
</CardFooter>
@@ -438,7 +450,7 @@ export let examples = [
438450
</p>
439451
</CardBody>
440452
<CardFooter>
441-
<a href="javascript:void(0);">
453+
<a className="slds-card__footer-action" href="javascript:void(0);">
442454
View All <span className="slds-assistive-text">entity type</span>
443455
</a>
444456
</CardFooter>

0 commit comments

Comments
 (0)