Skip to content
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: center alligned ghost icon button #18503

Merged

Conversation

riddhybansal
Copy link
Contributor

@riddhybansal riddhybansal commented Feb 3, 2025

Closes #18420
Fix ghost button icon alignment in icon-only variant

Changelog

Changed

  • Fixed icon alignment in ghost buttons with icon-only variant by resetting padding-block-start
  • Optimized SCSS structure for ghost button styles by combining related selectors

Testing / Reviewing

Steps to verify:

  1. Go to Icon Button
  2. Verify that:
  • Icon is properly centered in the ghost button
  • Hover and active states work correctly
  • Other button variants (primary, secondary, danger) maintain their correct alignment
  • Selected state of ghost button maintains proper icon alignment

@riddhybansal riddhybansal requested a review from a team as a code owner February 3, 2025 15:02
Copy link

netlify bot commented Feb 3, 2025

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit d1046d0
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/67b6fa9dd2e6b50008be1e3b
😎 Deploy Preview https://deploy-preview-18503--v11-carbon-web-components.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.

Copy link

netlify bot commented Feb 3, 2025

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit d1046d0
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/67b6fa9d6d724e000803bb3d
😎 Deploy Preview https://deploy-preview-18503--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.

Copy link

netlify bot commented Feb 3, 2025

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit d1046d0
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/67b6fa9d3525530008bb5f89
😎 Deploy Preview https://deploy-preview-18503--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.

Copy link

codecov bot commented Feb 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.92%. Comparing base (9883920) to head (d1046d0).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #18503   +/-   ##
=======================================
  Coverage   84.92%   84.92%           
=======================================
  Files         408      408           
  Lines       14501    14501           
  Branches     4729     4699   -30     
=======================================
  Hits        12315    12315           
+ Misses       2026     2025    -1     
- Partials      160      161    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@preetibansalui preetibansalui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works as expected with the ghost button in the selected state, but I’ve noticed it’s causing issues with the expressive state now.

image

@riddhybansal
Copy link
Contributor Author

The Icon button is broken for some other sizes and variant as well for both react and web components . Here is the issue created.

Copy link
Contributor

@preetibansalui preetibansalui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, Thanks for the changes Riddhi!

@preetibansalui
Copy link
Contributor

Hey I approved the PR and then saw its failing the Percy, can you please check why it's updating the snapshot. Thanks!

@riddhybansal riddhybansal added this pull request to the merge queue Feb 18, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 18, 2025
@riddhybansal riddhybansal added this pull request to the merge queue Feb 20, 2025
Merged via the queue into carbon-design-system:main with commit 62b5c1e Feb 20, 2025
38 checks passed
@riddhybansal riddhybansal deleted the ghost_icon_allignment branch February 20, 2025 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[Bug]: Ghost Icon button not center aligned
3 participants