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(#1019): modify buttons icons padding #1020

Merged
merged 4 commits into from
Jan 11, 2022

Conversation

MewenLeHo
Copy link
Contributor

@MewenLeHo MewenLeHo commented Jan 5, 2022

Closes #1019

Prerequisites

Describe the issue

Icons in buttons icons should be 1px lower.
chrome
firefox

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would change existing functionality)

Copy link
Member

@louismaximepiton louismaximepiton left a comment

Choose a reason for hiding this comment

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

Sounds not good to me.

Copy link
Member

@louismaximepiton louismaximepiton left a comment

Choose a reason for hiding this comment

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

It looks like something's wrong with that : Icons are 1px too low, on discuss.

@MewenLeHo
Copy link
Contributor Author

MewenLeHo commented Jan 5, 2022

It looks like something's wrong with that : Icons are 1px too low, on discuss.

One possible way:

  • keep the modification (padding-top and bottom are equals thanks to it)
  • remove the .btn > svg {translate(1px)} rule NO or else text and icons in buttons with icons component will be centered (and they should not ben centered according to design guidelines)
  • change ".btn > svg {translate(1px)}" to ".btn:not(.btn-icon) > svg {translate(1px)}"

Copy link
Member

@julien-deramond julien-deramond left a comment

Choose a reason for hiding this comment

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

It doesn't work with Firefox 95.0.1 (64-bit) under Ubuntu. The icon is not centered.

Screenshot from 2022-01-07 14-06-33

But I don't understand the issue. In the issue the icon seems to be centered in the screenshot. It is not because we have 7px / 9px in the inspector that it is the reality. transform: translateY(1px) is not reflected in those values.

@MewenLeHo MewenLeHo mentioned this pull request Jan 11, 2022
13 tasks
Copy link
Member

@julien-deramond julien-deramond left a comment

Choose a reason for hiding this comment

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

Checked it and it works with the latest versions of:

  • Ubuntu
    • Chrome
    • Firefox
  • macOS
    • Chrome
    • Firefox
    • Safari

If you've tested it with Browserstack as well, I think we can merge it.

@julien-deramond julien-deramond merged commit 064bb54 into main Jan 11, 2022
@julien-deramond julien-deramond deleted the main-mewenleho-buttons-icon-padding branch January 11, 2022 10:41
@julien-deramond julien-deramond mentioned this pull request Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Icons in buttons icons should be 1px lower
3 participants