From 8bc634af30b40e0b2884963c29781ef610431737 Mon Sep 17 00:00:00 2001 From: Andy Blum Date: Wed, 27 Nov 2024 14:26:50 -0500 Subject: [PATCH 1/2] fix(feature-section): stretch image if needed (#12126) * fix(feature-card): stretch image to fill if needed * fix(feature-section): stretch image to fill if needed * fix(feature-card): use css logical properties --------- Co-authored-by: Matthew Oliveira --- .../styles/scss/components/feature-card/_feature-card.scss | 1 + .../scss/components/feature-section/_feature-section.scss | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/styles/scss/components/feature-card/_feature-card.scss b/packages/styles/scss/components/feature-card/_feature-card.scss index 631254a6034..fc9e93262bb 100644 --- a/packages/styles/scss/components/feature-card/_feature-card.scss +++ b/packages/styles/scss/components/feature-card/_feature-card.scss @@ -125,6 +125,7 @@ $feature-flags: ( ::slotted([slot='image']), #{$c4d-prefix}-image { z-index: 0; + block-size: 100%; // Opacity is adjusted on hover. See above. &::before { diff --git a/packages/styles/scss/components/feature-section/_feature-section.scss b/packages/styles/scss/components/feature-section/_feature-section.scss index 0a5881f6019..9a0c316deee 100644 --- a/packages/styles/scss/components/feature-section/_feature-section.scss +++ b/packages/styles/scss/components/feature-section/_feature-section.scss @@ -1,5 +1,5 @@ /** - * Copyright IBM Corp. 2016, 2023 + * Copyright IBM Corp. 2016, 2024 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. @@ -121,6 +121,7 @@ ::slotted(#{$c4d-prefix}-image) { overflow: hidden; + block-size: 100%; @include breakpoint(sm) { block-size: aspect-ratio(1, 1); From 4a7c1d1d982f2fa508a5b475d4229152bd28c384 Mon Sep 17 00:00:00 2001 From: Matthew Oliveira Date: Wed, 27 Nov 2024 15:48:24 -0500 Subject: [PATCH 2/2] fix(callout-with-media): spacing adjustments (#12124) ### Related Ticket(s) [ADCMS-6942](https://jsw.ibm.com/browse/ADCMS-6942) ### Description Adjust spacing on the `` component per the [Figma specs](https://www.figma.com/design/ADYTE8HS12nn63RJLZOk87/Layout-component--callout-with-media--visual-specs--2.1?node-id=0-1&node-type=canvas&t=QNmoJfFTr6bA75Ak-0). Note that there are no v2 specs for this component. ### Changelog **Changed** - Adjust spacing for slotted elements to the `` component. --- .../components/callout-with-media/_callout-with-media.scss | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/styles/scss/components/callout-with-media/_callout-with-media.scss b/packages/styles/scss/components/callout-with-media/_callout-with-media.scss index 5b0f77a2bcc..5f29a6e72f0 100644 --- a/packages/styles/scss/components/callout-with-media/_callout-with-media.scss +++ b/packages/styles/scss/components/callout-with-media/_callout-with-media.scss @@ -1,5 +1,5 @@ // -// Copyright IBM Corp. 2016, 2023 +// Copyright IBM Corp. 2016, 2024 // // This source code is licensed under the Apache-2.0 license found in the // LICENSE file in the root directory of this source tree. @@ -96,6 +96,8 @@ :host(#{$c4d-prefix}-callout-with-media-video) ::slotted(#{$c4d-prefix}-video-player) { @extend :host(#{$c4d-prefix}-callout-caption); + + margin-block-end: 0; } :host(#{$c4d-prefix}-callout-with-media-image[color-scheme='inverse']) @@ -159,7 +161,7 @@ .#{$prefix}--callout-with-media .#{$prefix}--callout__content .#{$prefix}--content-block { - padding-block-end: $spacing-10; + padding-block-end: $spacing-07; } :host(#{$c4d-prefix}-callout-with-media-image),