Skip to content

Instantly share code, notes, and snippets.

@chrisrouse
Created June 3, 2013 14:20
Show Gist options
  • Save chrisrouse/5698480 to your computer and use it in GitHub Desktop.
Save chrisrouse/5698480 to your computer and use it in GitHub Desktop.
.input-focus(@r, @g, @b) {
textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="time"]:focus,
input[type="week"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="color"]:focus,
.uneditable-input:focus {
border-color: rgba(@r, @g, @b, 0.8);
outline: 0;
outline: thin dotted \9;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(@r, @g, @b, 0.6);
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(@r, @g, @b, 0.6);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(@r, @g, @b, 0.6);
}
}
-----
.input-focus(@red, @green, @blue);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment