Skip to content

Instantly share code, notes, and snippets.

@msweeney
Last active December 18, 2015 04:49
Show Gist options
  • Save msweeney/5728262 to your computer and use it in GitHub Desktop.
Save msweeney/5728262 to your computer and use it in GitHub Desktop.
Selector shorthand in Less
@texty-inputs: ~'input[type="text"], input[type="password"], input[type="email"], input[type="url"], input[type="date"], input[type="month"], input[type="time"], input[type="datetime"], input[type="datetime-local"], input[type="week"], input[type="number"], input[type="search"], input[type="tel"], input[type="color"]';
.pure-form {
@{texty-inputs} {
display: block;
}
}
// yields
.pure-form input[type="text"], input[type="password"], input[type="email"], input[type="url"], input[type="date"], input[type="month"], input[type="time"], input[type="datetime"], input[type="datetime-local"], input[type="week"], input[type="number"], input[type="search"], input[type="tel"], input[type="color"] {
display: block;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment