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

refactor(Button): padding units from pixel to rem #13407

Merged

Conversation

jsehull
Copy link
Contributor

@jsehull jsehull commented Mar 27, 2023

Closes #10318

Change remaining px units in Button padding to rem

Changelog

New

  • n/a

Changed

  • update padding pixel units to rem equivalent

Removed

  • n/a

Testing / Reviewing

  1. Confirm pixel values are now in rem
  2. Confirm the new rem calculations still have the same desired size outcome as before. Below are some Dev Tool images of the original button sizes before this update for comparison.
  • sm
    Padding

  • md
    image

  • lg
    Padding

  • xl
    Padding

  • 2xl
    Padding

  1. Here are some values you can paste into Secondary buttons in Button.stories.js to manually inspect the values per size.
<>
    <Button size="sm" kind="secondary" {...args}> Button </Button>
    <Button size="md" kind="secondary" {...args}> Button </Button>
    <Button size="lg" kind="secondary" {...args}> Button </Button>
    <Button size="xl" kind="secondary" {...args}> Button </Button>
    <Button size="2xl" kind="secondary" {...args}> Button </Button>
</>

@jsehull jsehull requested a review from a team as a code owner March 27, 2023 16:49
@jsehull jsehull requested review from tw15egan and aledavila March 27, 2023 16:49
@jsehull jsehull changed the title refactor(Button): pixel to rem units refactor(Button): padding units from pixel to rem Mar 27, 2023
@netlify
Copy link

netlify bot commented Mar 27, 2023

Deploy Preview for carbon-components-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 2f3e092
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/6426cdab10a4480008cec554
😎 Deploy Preview https://deploy-preview-13407--carbon-components-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 settings.

@netlify
Copy link

netlify bot commented Mar 27, 2023

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 2f3e092
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/6426cdabc7e6d700088e4b2f
😎 Deploy Preview https://deploy-preview-13407--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 settings.

Copy link
Collaborator

@francinelucca francinelucca left a comment

Choose a reason for hiding this comment

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

LGTM!
Before
image

After
image

@kodiakhq kodiakhq bot merged commit d31ffcb into carbon-design-system:main Mar 31, 2023
@jsehull jsehull deleted the 10318/button-padding-rem-units branch March 31, 2023 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Button padding is not using relative units
3 participants