-
-
Save caleb531/a2b0f0fa3b6adac50c215a49ece6b045 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
@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; | |
} | |
$text-inputs-list: 'input[type="color"]', | |
'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"]', | |
'input:not([type])', | |
'textarea'; | |
$all-text-inputs: assign-inputs($text-inputs-list); | |
@function remove($list, $value, $recursive: false) { | |
$result: (); | |
@for $i from 1 through length($list) { | |
@if type-of(nth($list, $i)) == list and $recursive { | |
$result: append($result, remove(nth($list, $i), $value, $recursive)); | |
} | |
@else if nth($list, $i) != $value { | |
$result: append($result, nth($list, $i), comma); | |
} | |
} | |
@return $result; | |
} | |
$all-text-inputs-except-textarea: remove($all-text-inputs, 'textarea'); | |
#{$all-text-inputs-except-textarea} { | |
font-size: 12px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input[type="color"], 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"], input:not([type]) { | |
font-size: 12px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment