Skip to content

Instantly share code, notes, and snippets.

@scottkellum
Created September 20, 2013 17:13
Show Gist options
  • Save scottkellum/6640741 to your computer and use it in GitHub Desktop.
Save scottkellum/6640741 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.2.10)
// Compass (v0.13.alpha.4)
// ----
$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"]';
@function selector-append($list, $append) {
$return: ();
@each $item in $list {
$return: join($return, unquote($item) + unquote($append), comma);
}
@return $return;
}
#{selector-append(selector-append($inputs-list, '.foo'), '.error')} {
foo: bar;
}
input[type="email"].foo.error, input[type="number"].foo.error, input[type="password"].foo.error, input[type="search"].foo.error, input[type="tel"].foo.error, input[type="text"].foo.error, input[type="url"].foo.error, input[type="color"].foo.error, input[type="date"].foo.error, input[type="datetime"].foo.error, input[type="datetime-local"].foo.error, input[type="month"].foo.error, input[type="time"].foo.error, input[type="week"].foo.error {
foo: bar;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment