-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(button): center icon inside danger ghost icon only buttons #16923
fix(button): center icon inside danger ghost icon only buttons #16923
Conversation
All contributors have signed the DCO. |
✅ Deploy Preview for v11-carbon-react ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
…ed_to_center_16841
I have read the DCO document and I hereby sign the DCO. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey thanks for taking a look at this!
Removing this style causes the button to inherit the padding styling from the general button styles, which does not match the spec. Ghost buttons should not have additional padding like the other buttons.
What's correct in prod right now:
You'll need to target a different selector to apply the proper modifications necessary. It could go after this selector in the icon-only styling block
carbon/packages/styles/scss/components/button/_button.scss
Lines 173 to 176 in c8b452a
&.#{$prefix}--btn--ghost .#{$prefix}--btn__icon, | |
&.#{$prefix}--btn--danger--ghost .#{$prefix}--btn__icon { | |
margin: 0; | |
} |
Thank you @tay1orjones for your review, I have applied the modifications by adding
|
…ed_to_center_16841
…ed_to_center_16841
Hello @tay1orjones @alisonjoseph , Can you review the latest update please. Regards. |
…ed_to_center_16841
…ed_to_center_16841
…ed_to_center_16841
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
8c419f6
to
7fb4c4b
Compare
7fb4c4b
to
e0e67fb
Compare
…ed_to_center_16841
There is a slight upward pixel shift of the vertical icon alignment when comparing with the primary kind has been fixed. Screen.Recording.2024-08-19.at.12.15.23.PM.mov |
…ed_to_center_16841
…ed_to_center_16841
…ed_to_center_16841
…ed_to_center_16841
…ed_to_center_16841
…ed_to_center_16841
…ed_to_center_16841
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Sorry for the delay in review
a9bddc8
Closes #16841
The icon inside the IconButton is not center aligned when the danger--ghost is used with kind prop
Changelog
Removed
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.
Screen.Recording.2024-07-08.at.3.41.46.PM.mov