carbon icon indicating copy to clipboard operation
carbon copied to clipboard

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

Open AliAldobyan opened this issue 1 year ago • 7 comments

Closes #16841

The icon inside the IconButton is not center aligned when the danger--ghost is used with kind prop

Changelog

Removed

  • removed "padding-inline-end" in _button.scss file line 286

Testing / Reviewing

1- Go to react storybook. 2- Click on Button Component. 3- Choose Icon Button. 4- Choose danger--ghost as the button kind.

Recording is attached.

https://github.com/carbon-design-system/carbon/assets/17975825/305c55b8-5ef9-49b7-9eb7-0e565d1892b9

AliAldobyan avatar Jul 08 '24 16:07 AliAldobyan

All contributors have signed the DCO.
Posted by the DCO Assistant Lite bot.

github-actions[bot] avatar Jul 08 '24 16:07 github-actions[bot]

Deploy Preview for v11-carbon-react ready!

Name Link
Latest commit a013e60852410a3c346672e08c777a5985ca8735
Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/66edc7f9faa0520008319fbe
Deploy Preview https://deploy-preview-16923--v11-carbon-react.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Jul 08 '24 16:07 netlify[bot]

Deploy Preview for carbon-elements ready!

Name Link
Latest commit a013e60852410a3c346672e08c777a5985ca8735
Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/66edc7f914ff4d0007d43bad
Deploy Preview https://deploy-preview-16923--carbon-elements.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Jul 08 '24 16:07 netlify[bot]

I have read the DCO document and I hereby sign the DCO.

AliAldobyan avatar Jul 08 '24 16:07 AliAldobyan

Thank you @tay1orjones for your review, I have applied the modifications by adding

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

AliAldobyan avatar Jul 09 '24 06:07 AliAldobyan

Hello @tay1orjones @alisonjoseph , Can you review the latest update please.

Regards.

AliAldobyan avatar Jul 30 '24 14:07 AliAldobyan

There is a slight upward pixel shift of the vertical icon alignment when comparing with the primary kind

2024-08-12.at.14.20.10-MAIN-Google.Chrome.mp4

There is a slight upward pixel shift of the vertical icon alignment when comparing with the primary kind has been fixed.

https://github.com/user-attachments/assets/367b49db-411b-4f49-8284-046e916a22e6

AliAldobyan avatar Aug 19 '24 09:08 AliAldobyan