Skip to content

Instantly share code, notes, and snippets.

@andystalick
Created September 4, 2015 17:01
Show Gist options
  • Save andystalick/aeca39897266c19f0455 to your computer and use it in GitHub Desktop.
Save andystalick/aeca39897266c19f0455 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<input type="search" value="foobar"></input>
// ----
// libsass (v3.2.5)
// ----
// Avoid having to target all text inputs everytime we want to style them.
@mixin style-text-inputs() {
input[type="text"],
input[type="search"],
input[type="url"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="range"] {
@content;
}
}
%input-base-styles, textarea {
font-family: Arial;
border: 1px solid #CCC;
border-radius: 3px;
font-size: 1em;
padding: 0.5em;
width:100%;
max-width: 600px;
display:block;
}
@include style-text-inputs {
@extend %input-base-styles;
}
input[type="text"],
input[type="search"],
input[type="url"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="range"], textarea {
font-family: Arial;
border: 1px solid #CCC;
border-radius: 3px;
font-size: 1em;
padding: 0.5em;
width: 100%;
max-width: 600px;
display: block;
}
<input type="search" value="foobar"></input>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment