Skip to content

Commit

Permalink
fix(button-cta): remove style overrides covered elsewhere (#11966)
Browse files Browse the repository at this point in the history
### Related Ticket(s)

Closes #11959

### Description

Fixes an icon alignment issue in the `<c4d-button-cta>` component by removing style overrides that interfered with, or were already covered by extending `c4d-button`.

### Changelog

**Changed**

- Fix button-cta styles to correct icon alignment

<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "test: e2e": Codesandbox examples and e2e integration tests -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
  • Loading branch information
m4olivei committed Aug 7, 2024
1 parent 3143781 commit 30afc55
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions packages/web-components/src/components/cta/cta.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright IBM Corp. 2020, 2023
// Copyright IBM Corp. 2020, 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.
Expand All @@ -11,17 +11,6 @@
@use '../feature-card/feature-card'; /* Covers regular card style, too */
@use '@carbon/ibmdotcom-styles/scss/globals/vars' as *;

.#{$c4d-prefix}-ce--cta__icon {
flex-shrink: 0;
}

:host(#{$c4d-prefix}-button-cta) .#{$c4d-prefix}-ce--cta__icon {
position: absolute;
inset-block-start: 50%;
inset-inline-end: $spacing-05;
transform: translateY(-50%);
}

:host(#{$c4d-prefix}-cta) {
display: block;
}

0 comments on commit 30afc55

Please sign in to comment.