-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Hamburgers are not vertically aligned to center of button #66
Comments
@xavianaxw I ran into this as well. A simpler solution is to explicitly set a line-height value of 1 on the base hamburger class: .hamburger: {
line-height: 1;
} And to set the hamburger-box element to display block: .hamburger-box {
display: block;
} |
I just did it, can confirm it's pixel perfect. |
The reason is 2 possible solutions:
|
PR #88 |
My hamburger settings:
With Normalize.css, a style with
will be applied to the
<button>
element causing the button to have a height of 24px whereas my hamburger will only have 16px height with the settings above.As per the screenshot, you can see the hamburger does not align with the button's height vertically.
First thing I tried
Adding
vertical-align: middle
to.hamburger-box
.But it still doesn't seem vertically centered.
Second (which hopefully is a better solution for hamburgers)
Giving
.hamburger
awidth
andheight
property, and position centering.hamburger-box
in relative to.hamburger
as such.Giving us this.
I can create a PR for this if you'd like @jonsuh
Cheers
The text was updated successfully, but these errors were encountered: