From 8459cc79f407083861c33867c58ac9edfc61a818 Mon Sep 17 00:00:00 2001 From: Matthew Oliveira Date: Wed, 11 Dec 2024 15:30:02 -0500 Subject: [PATCH] fix(link-with-icon): fix icon placement (#12159) ### Related Ticket(s) [ADCMS-7258](https://jsw.ibm.com/browse/ADCMS-7258) ### Description This corrects a bad prefix conversion from v1 to v2 that meant that the necessary styles required to correctly reflect the `icon-placement="left"` on a `` component were not present. Note that the way Storybook knobs work was hiding this issue in the Link with Icon story. The bug can be reproduced by going to the [Link with icon story in the v2 Storybook](https://carbon-design-system.github.io/carbon-for-ibm-dotcom/next/web-components/?path=/story/components-link-with-icon--default), setting "Icon Position" to left, then opening in a new tab. Test in the deploy preview in the same way to ensure the bug is fixed. ### Testing instructions * Open the Link with Icon > Default story * Set the "Icon Position" knob to left * Open in a new tab * Icon should now appear as expected * Also go through the Footer and Locale Modal stories to check the reported link icon is in the right spot. ### Changelog **Changed** - Fixed left icon placement in Link with icon component --- .../scss/components/link-with-icon/_link-with-icon.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/styles/scss/components/link-with-icon/_link-with-icon.scss b/packages/styles/scss/components/link-with-icon/_link-with-icon.scss index 43efdb358c8..37cabfe29c9 100644 --- a/packages/styles/scss/components/link-with-icon/_link-with-icon.scss +++ b/packages/styles/scss/components/link-with-icon/_link-with-icon.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. @@ -15,7 +15,7 @@ @use '../lightbox-media-viewer/lightbox-media-viewer'; @mixin link-with-icon { - .#{$c4d-prefix}--link-with-icon, + .#{$prefix}--link-with-icon, :host(#{$c4d-prefix}-link-with-icon), :host(#{$c4d-prefix}-link-list-item), :host(#{$c4d-prefix}-link-list-item-cta),