Skip to content

Instantly share code, notes, and snippets.

@sturobson
Forked from nathansmith/1_form-reset.scss
Created April 10, 2013 20:27
Show Gist options
  • Save sturobson/5358142 to your computer and use it in GitHub Desktop.
Save sturobson/5358142 to your computer and use it in GitHub Desktop.
// Note: This file is dependent on Sass and Compass.
// Sass = http://sass-lang.com
// Compass = http://compass-style.org
@import "compass/css3"
// `Form Element Reset.
//----------------------------------------------------------------------------------------------------
input[type="search"]::-webkit-search-decoration
display: none
// Remove, if you want Opera
// to retain OS X style UI.
input[type="radio"],
input[type="checkbox"]
margin: 0
button,
input[type="reset"],
input[type="submit"],
input[type="button"]
-webkit-appearance: none
+background-clip(padding-box)
+border-radius(0)
background: none
border: 0
cursor: pointer
display: inline-block
overflow: visible
margin: 0
outline: 0
padding: 0
vertical-align: top
text-align: center
width: auto
// Helvetica Neue present, because it works better
// for line-height on buttons than Arial, on OS X.
font: 13px/1 "Helvetica Neue", Arial, "Liberation Sans", FreeSans, sans-serif
textarea,
select,
input[type="date"],
input[type="datetime"],
input[type="datetime-local"],
input[type="email"],
input[type="month"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="text"],
input[type="time"],
input[type="url"],
input[type="week"]
+box-sizing(border-box)
+background-clip(padding-box)
+border-radius(0)
-webkit-appearance: none
background: none
border: 0
margin: 0
outline: 0
padding: 0
text-align: left
vertical-align: top
font-size: 13px
// Leaving out Helvetica Neue, to not throw off size="..."
// on inputs. Arial is more reliable, on Windows and OS X.
font-family: Arial, "Liberation Sans", FreeSans, sans-serif
button[disabled],
input[disabled],
select[disabled],
select[disabled] option,
select[disabled] optgroup,
textarea[disabled]
// +opacity(0.25)
-moz-user-select: -moz-none
-webkit-user-select: none
-khtml-user-select: none
user-select: none
cursor: default
textarea
min-height: 50px
overflow: auto
resize: vertical
width: 100%
optgroup
font-style: normal
font-weight: normal
// Font family repeated, for Firefox.
font-family: Arial, "Liberation Sans", FreeSans, sans-serif
// For Firefox
input,
button,
select,
textarea
// Suppress red glow that Firefox
// adds to form fields by default,
// even when user is still typing.
&:invalid
+box-shadow(none)
// Kill phantom spacing and dotted
// border that appears in Firefox.
&::-moz-focus-inner
border: 0
padding: 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment