diff --git a/packages/webawesome/src/components/card/card.css b/packages/webawesome/src/components/card/card.css index e87c28c6d..5156511df 100644 --- a/packages/webawesome/src/components/card/card.css +++ b/packages/webawesome/src/components/card/card.css @@ -76,21 +76,8 @@ } } -/* Make these slots "full width" */ -::slotted([slot='header']), -::slotted([slot='footer']) { - flex-grow: 1; -} - -/* Push slots to sides when the action slots renders */ -.has-actions { - display: flex; - justify-content: space-between; -} - .header { display: block; - align-items: center; border-block-end-style: inherit; border-block-end-color: var(--wa-color-surface-border); border-block-end-width: var(--wa-panel-border-width); @@ -104,13 +91,19 @@ .footer { display: block; - align-items: center; border-block-start-style: inherit; border-block-start-color: var(--wa-color-surface-border); border-block-start-width: var(--wa-panel-border-width); padding: var(--spacing); } +/* Push slots to sides when the action slots renders */ +.has-actions { + display: flex; + align-items: center; + justify-content: space-between; +} + :host(:not([with-header])) .header, :host(:not([with-footer])) .footer, :host(:not([with-media])) .media { @@ -125,7 +118,12 @@ border-start-start-radius: var(--inner-border-radius); border-end-start-radius: var(--inner-border-radius); border-start-end-radius: 0; - object-fit: cover; + + &::slotted(*) { + block-size: 100%; + inline-size: 100%; + object-fit: cover; + } } }