title: Sass: Create mixin for input fields
body: <p>I'm new to Sass so I need help with the creation of a mixing for my input fields.</p>
  
  <p>However, if anyone knows of an already made mixin for this or if Compass has one that accomplishes this, please let me (us) know.</p>
  
  <p>I currently have the following CSS rules in my .scss file:</p>
  
  <pre><code>input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="search"],
  input[type="url"],
  textarea, 
  select { ... }
  
  input[type="text"]:hover,
  input[type="text"]:focus,
  input[type="password"]:hover,
  input[type="password"]:focus,
  input[type="email"]:hover,
  input[type="email"]:focus,
  input[type="search"]:hover,
  input[type="search"]:focus,
  input[type="url"]:hover,
  input[type="url"]:focus,
  textarea:hover,
  textarea:focus,
  select:hover,
  select:focus  { ... }
  </code></pre>
  
  <p>Now, as we know HTML5 provides a nice new set of <a href="http://www.456bereastreet.com/archive/201004/html5_input_types/" rel="nofollow">input types</a>, but right now I don't need to add input types like <code>date</code>, <code>month</code> or <code>week</code>, that's why I don't have them listed "yet".</p>
  
  <p>So in the case I need to add them in the future, I'll update that list you see above.</p>
  
  <p>However, my problem is that I feel I'm repeating myself all over here, plus, the work of selecting items, copying, pasting and editing every time for every new input type I add to the list is just plain dumb and I almost sure Sass' mixins can be of help with this. The problem is that creating a mixin for this is honestly very confusing to me.</p>
  
  <p>I've looked around here and the web for something similar but haven't been able to find anything.</p>
  
  <p>Any help with this is greatly appreciated.</p>