Skip to content

Commit

Permalink
fix(button): style import (carbon-design-system#11638)
Browse files Browse the repository at this point in the history
### Related Ticket(s)

Closes [carbon-design-system#11570](carbon-design-system#11570)

### Description

use carbon button styles instead and copy over additional cwc styles

add optional to modal button styles
### Changelog

**New**

- {{new thing}}

**Changed**

- {{changed thing}}

**Removed**

- {{removed thing}}

<!-- 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
ariellalgilmore authored Mar 20, 2024
1 parent 251e06f commit 7b05b73
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions packages/styles/scss/components/button/_button.scss
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -8,17 +8,25 @@
@use '@carbon/styles/scss/config' as *;
@use '@carbon/styles/scss/spacing' as *;
@use '@carbon/styles/scss/theme' as *;
@use '@carbon/styles/scss/layout' as *;
@use '@carbon/styles/scss/components/button' as *;
@use '../../globals/vars' as *;
@use '../../../../carbon-web-components/src/components/button/button';

@mixin button {
:host(#{$c4d-prefix}-button) {
@extend :host(#{$prefix}-button);
@include emit-layout-tokens();

display: inline-flex;

svg {
@extend .#{$prefix}--btn__icon;
}

.#{$prefix}--btn {
flex-grow: 1;
max-inline-size: 100%;
}

.#{$prefix}--btn--hidden {
display: none;
visibility: hidden;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
}

:host(#{$c4d-prefix}-expressive-modal-close-button) {
@extend .#{$prefix}--modal-close-button;
@extend .#{$prefix}--modal-close-button !optional;

.#{$prefix}--modal-close {
position: fixed;
Expand Down

0 comments on commit 7b05b73

Please sign in to comment.