Skip to content

Instantly share code, notes, and snippets.

@sillero
Last active January 3, 2016 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sillero/8479381 to your computer and use it in GitHub Desktop.
Save sillero/8479381 to your computer and use it in GitHub Desktop.
Select-reset for cross-device <select> appearance
/*
Tested on
(Windows 7)
Chrome, Firefox
(Android 4.1)
Android Browser, Chrome, Firefox
(iOS 6.1.3)
Safari
*/
.select--wrapper { //in case you want a css caret
&::after {
/*
your caret style here
*/
}
select {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
padding: $vetical-padding 0; //use padding instead of height or line-height
background: #fff; //set a background, even if it's transparent, or in case you want an image for caret
text-indent: $indent; //use indentation to get rid of firefox-android caret
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment