-
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
Custom select box styling #127
Conversation
} | ||
|
||
&::-ms-expand { | ||
opacity:0; |
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.
Colon after property should be followed by one space
padding: 7px 24px 7px 8px; | ||
vertical-align: middle; | ||
background-color: #fff; | ||
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAaCAMAAACNQ/wIAAAAYFBMVEUzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMS2aZBAAAAH3RSTlMAAQYNDg8VJDQ2N0JbdXZ4h4mKpL3Iycvb6vDx8vn+GLdSCAAAAHBJREFUeNq90TcSgDAMRFGRMwZMTnv/W+IBm6BxzSt/pUBGURKT73v+LdkGbNm7xDOUOXlKNOE0RaaEI7QxvIrX4db5pLgtXlqXyJH4kA5VYCr6Xw2msYxqWUgJetyGwH4cfkIjXaCsqfUd/GmMEKQdADIVzQIQilIAAAAASUVORK5CYII=) no-repeat right 8px center; |
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.
We don't typically base64 images, but not saying it's a bad thing. Just asking the obvious if we're cool with this.
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'm fine doing this as a static asset someplace, but would need advice as to how we set that up.
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.
Let's leave it as base64 since Primer itself has no CDN.
Overall I'm 👍 on this kind of improvement. I personally would like it to look slightly closer to our buttons than our text boxes, just to give it a little more dropdownish feel. And to indicate that it's clickable. |
I'm fine with there being a difference between true select boxes having the double arrow and the drop downs having the single. The former is a true form element where the latter is just a navigation item. I can add a stronger gradient to match the buttons, but I'll defer to @mdo on the direction we want to go with that. I like that these are currently the inverse of an input. |
I'm actually kind of okay with making it look a bit different than our buttons and custom Originally I wasn't into the bottom-up shadow, but it feels push-y enough and looks pretty good still. I think the arrow needs to be a little more to the left, but that's about it. Lastly, we might want to add some basic styles to ensure proper vertical alignment of non-styled |
…rence vendor prefixes
… it's a select[multiple]
…w i nuked from the regular select to just the .select
…lement name for the heading
background-size: 9px 13px; | ||
box-shadow: inset 0 -1px 2px rgba(0, 0, 0, 0.075); | ||
// Have to include vendor prefixes as the `appearance` property isn't part of the CSS spec. | ||
-webkit-appearance: none; |
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.
Avoid vendor prefixes.
Pushed a bunch of changes clean up a few things:
Here are some updated screenshots showing the latest: |
box-shadow: inset 0 -1px 2px rgba(0, 0, 0, 0.075); | ||
// scss-lint:disable VendorPrefix | ||
// Have to include vendor prefixes as the `appearance` property isn't part of the CSS spec. | ||
-webkit-appearance: none; |
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.
Avoid vendor prefixes.
This reverts commit 244a732.
Loving where this is at. @mdo, Thanks for jumping in and fixing the last bits. Sidenote: Maybe we should consider switching to postcss https://github.com/nDmitry/grunt-postcss instead of the deprecated thing we've got going on now. |
What's deprecated? |
Is this what we're using? https://github.com/nDmitry/grunt-autoprefixer It's been deprecated in favor of grunt-postcss. |
Oh, yeah, we can do that for this release. |
Conflicts: css/.primer-stats.md css/primer.css
Add Windows emoji fonts to font fallback list
A stab at custom styling for our select dropdowns. They've always looked a little out of place on pages like this...
Context before
Context after
Safari 8.0.6
Retina
IE11 Windows 7
cc: @mdo @jonrohan