diff --git a/docs/docs/components/card.md b/docs/docs/components/card.md index 87a99abc2..bb50a96cd 100644 --- a/docs/docs/components/card.md +++ b/docs/docs/components/card.md @@ -186,11 +186,21 @@ Use the `appearance` attribute to change the card's visual appearance. ```html {.example}
+ A kitten sits patiently between a terracotta pot and decorative grasses.
Outlined (default)
Card content.
{% for appearance in ['outlined filled', 'outlined accent', 'plain', 'filled', 'accent'] -%} + A kitten sits patiently between a terracotta pot and decorative grasses.
{{ appearance | capitalize }}
Card content.
diff --git a/src/components/card/card.css b/src/components/card/card.css index 8b2f193f9..30df20f03 100644 --- a/src/components/card/card.css +++ b/src/components/card/card.css @@ -60,6 +60,15 @@ } } +/* Round all corners for plain appearance */ +:host([appearance='plain']) .image { + border-radius: var(--inner-border-radius); + + &::slotted(img) { + border-radius: inherit !important; + } +} + .header { display: block; border-block-end-style: inherit;