Skip to content

Commit

Permalink
fix(button): center icon inside danger ghost icon only buttons (#16923)
Browse files Browse the repository at this point in the history
* fix(client): bug 16841 by removing padding inline end

* fix(button): center icon inside danger ghost icon only buttons

* fix(button): center icon inside danger ghost icon only buttons

---------

Co-authored-by: Taylor Jones <[email protected]>
  • Loading branch information
AliAldobyan and tay1orjones committed Sep 21, 2024
1 parent 23b8ff3 commit a9bddc8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -1588,6 +1588,15 @@
"code"
]
},
{
"login": "AliAldobyan",
"name": "Ali Al Dobyan",
"avatar_url": "https://avatars.githubusercontent.com/u/17975825?v=4",
"profile": "https://github.com/AliAldobyan",
"contributions": [
"code"
]
},
{
"login": "Adam-Shea",
"name": "Adam Shea",
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ check out our [Contributing Guide](/.github/CONTRIBUTING.md) and our
<td align="center"><a href="https://github.com/nandininarayanofficial"><img src="https://avatars.githubusercontent.com/u/165769075?v=4?s=100" width="100px;" alt=""/><br /><sub><b>nandininarayanofficial</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=nandininarayanofficial" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/digiacomo-a"><img src="https://avatars.githubusercontent.com/u/117646602?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Andrea DG</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=digiacomo-a" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/lluisrojass"><img src="https://avatars.githubusercontent.com/u/15043356?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Luis</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=lluisrojass" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/AliAldobyan"><img src="https://avatars.githubusercontent.com/u/17975825?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ali Al Dobyan</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=AliAldobyan" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/lharrison13"><img src="https://avatars.githubusercontent.com/u/172074450?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Luke Harrison</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=lharrison13" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/tekno0ryder"><img src="https://avatars.githubusercontent.com/u/8721803?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ahmed Alsinan</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=tekno0ryder" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Adam-Shea"><img src="https://avatars.githubusercontent.com/u/44814104?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Adam Shea</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=Adam-Shea" title="Code">💻</a></td>
Expand Down
7 changes: 6 additions & 1 deletion packages/styles/scss/components/button/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@
);

> :first-child {
margin-block-start: convert.to-rem(1px);
min-inline-size: convert.to-rem(16px);
}

Expand All @@ -174,6 +173,12 @@
&.#{$prefix}--btn--danger--ghost .#{$prefix}--btn__icon {
margin: 0;
}

&.#{$prefix}--btn--danger--ghost {
padding-inline-end: calc(
layout.density('padding-inline') - convert.to-rem(16px)
);
}
}

// Adjust icon positioning in small, medium variants only
Expand Down

0 comments on commit a9bddc8

Please sign in to comment.