Created
April 24, 2011 03:52
-
-
Save plapier/939284 to your computer and use it in GitHub Desktop.
Style file-inputs in webkit browsers only.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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