Skip to content

Commit

Permalink
(card): Remove class form footer to make component clickable (#12097)
Browse files Browse the repository at this point in the history
* (card): Remove class form footer to make compnent clickable

* Update packages/web-components/src/components/card/card.ts

Co-authored-by: Matthew Oliveira <[email protected]>

* fix(card): fix arrow positioning

* fix(card-group): put the style for footer back

---------

Co-authored-by: Matthew Oliveira <[email protected]>
Co-authored-by: Andy Blum <[email protected]>
  • Loading branch information
3 people authored Nov 5, 2024
1 parent 90c3d9a commit 60d3b0a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions packages/styles/scss/components/card/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@
content: '';
inset: 0;
}

.#{$prefix}--card__footer-wrapper {
margin-block-start: auto;
}
}

// Card with pictogram placement style
Expand Down Expand Up @@ -466,8 +470,6 @@
:host(#{$c4d-prefix}-card-in-card-footer) a,
:host(#{$c4d-prefix}-feature-card-footer) a,
:host(#{$c4d-prefix}-feature-cta-footer) a {
/* Moves the footer down to the bottom in the card */
margin-block-start: auto;
text-decoration: none;

&:focus {
Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/src/components/card/card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class C4DCard extends CTAMixin(StableSelectorMixin(CDSLink)) {
${hasPictogram && this.pictogramPlacement === PICTOGRAM_PLACEMENT.TOP
? this._renderCopy()
: ''}
<div part="footer-wrapper" class="${prefix}--card__footer">
<div part="footer-wrapper" class="${prefix}--card__footer-wrapper">
<slot name="footer"></slot>
</div>
</div>
Expand Down

0 comments on commit 60d3b0a

Please sign in to comment.