Skip to content

Instantly share code, notes, and snippets.

@lightstrike
Created July 11, 2014 23:06
Show Gist options
  • Save lightstrike/119893385b49d63bc9e1 to your computer and use it in GitHub Desktop.
Save lightstrike/119893385b49d63bc9e1 to your computer and use it in GitHub Desktop.
pyScss Debug File
@function assign-inputs($inputs, $pseudo: null) {
$list : ();
@each $input in $inputs {
$input: unquote($input);
$input: if($pseudo, $input + ":" + $pseudo, $input);
$list: append($list, $input, comma);
}
@return $list;
}
$inputs-list: 'input[type="email"]',
'input[type="number"]',
'input[type="password"]',
'input[type="search"]',
'input[type="tel"]',
'input[type="text"]',
'input[type="url"]',
// Webkit & Gecko may change the display of these in the future
'input[type="color"]',
'input[type="date"]',
'input[type="datetime"]',
'input[type="datetime-local"]',
'input[type="month"]',
'input[type="time"]',
'input[type="week"]';
// Bare inputs
//************************************************************************//
$all-text-inputs: assign-inputs($inputs-list);
#{$all-text-inputs} {
color: red;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment