Skip to content

Instantly share code, notes, and snippets.

@plapier

plapier/gist:939284

Created Apr 24, 2011
Embed
What would you like to do?
Style file-inputs in webkit browsers only.
// Style file-upload for webkit-based browsers
@media screen and (-webkit-min-device-pixel-ratio:0) {
input[type="file"] {
background: #fff;
border: 1px solid $tan;
@include border-radius(0 2px 2px 0);
@include box-sizing(border-box);
color: #666;
font-size: 14px;
height: 32px;
@include linear-gradient(#ffffe8, white);
margin-left: 77px;
padding: 4px 15px;
position: relative;
text-indent: -200px;
width: 500px;
@include transition;
&::before {
@include border-radius(2px 0 0 2px);
border: 1px solid $tan-dark;
@include box-sizing(border-box);
color: #FFF;
content: 'Select File';
display: block;
font-size: 14px;
font-weight: bold;
height: 32px;
left: -78px;
@include linear-gradient(#F3BC00, #E0A002);
padding: 9px 10px;
position: absolute;
text-align: center;
text-indent: 0;
text-shadow: #333 1px 1px 1px;
@include title-font;
top: -1px;
@include transition;
width: 100px;
}
&:focus, &:hover {
border: 1px solid $tan-dark;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment