-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Improve Select Menu spacing #844
Conversation
This pull request is automatically deployed with Now. Latest deployment for this branch: https://primer-css-git-select-menu-spacing.primer.now.sh |
One side effect of adding the icon as inline block is that there could be a "white space gap", depending how the markup is authored. Also the Primer docs remove the white space, but storybook doesn't. There are a few options to remove it all the time. |
Add erb to example
Ok, I think this is now ready. /cc @shawnbot |
src/select-menu/select-menu.scss
Outdated
position: absolute; | ||
height: 1.5em; // Mimics line-height to vertically center the icon | ||
margin-left: -20px; | ||
width: 16px; // fixed width to make sure following content aligns |
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.
Just curious: why 16px
here instead of $spacer-3
?
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.
My thinking was that the fixed width has less to do with "spacing" and is more related to the maximal width of Octicons, which are 16px
.
But yeah, I'll change it to $spacer-3
to avoid ✨ magic numbers.
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.
I had one question about the use of 16px
, but otherwise this LGTM. Thanks for tidying this up!
This makes the check icons optional. Which means that if no check icons are added, the left padding is reduced and aligned with the title:
Closes #843