diff options
author | Mark Otto <markotto@twitter.com> | 2012-05-15 20:04:44 +0400 |
---|---|---|
committer | Mark Otto <markotto@twitter.com> | 2012-05-15 20:04:44 +0400 |
commit | 532569fe59bbc8a1a74d7984279749f736cbdd3a (patch) | |
tree | fa11a84cade65366105e511f99d1fadbfb226b30 /less | |
parent | ecf84bdac51a9c56d18c4a25b3d5b0c66a09151a (diff) |
updated forms to rearrange focus state, reinstate uneditable-input, and a few other cleanup tidbits
Diffstat (limited to 'less')
-rw-r--r-- | less/forms.less | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/less/forms.less b/less/forms.less index 277cdf42f1..f0fd90f8d7 100644 --- a/less/forms.less +++ b/less/forms.less @@ -77,7 +77,8 @@ input[type="email"], input[type="url"], input[type="search"], input[type="tel"], -input[type="color"] { +input[type="color"], +.uneditable-input { display: inline-block; height: @baseLineHeight; padding: 4px; @@ -115,6 +116,14 @@ input[type="color"] { .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); @transition: border linear .2s, box-shadow linear .2s; .transition(@transition); + + // Focus state + &:focus { + border-color: rgba(82,168,236,.8); + outline: 0; + outline: thin dotted \9; /* IE6-9 */ + .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)"); + } } // Position radios and checkboxes better @@ -161,7 +170,13 @@ select[size] { height: auto; } - +// Focus for select, file, radio, and checkbox +select:focus, +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + .tab-focus(); +} @@ -202,26 +217,6 @@ select[size] { -// FOCUS STATE -// ----------- - -input:focus, -textarea:focus { - border-color: rgba(82,168,236,.8); - outline: 0; - outline: thin dotted \9; /* IE6-9 */ - .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)"); -} -input[type="file"]:focus, -input[type="radio"]:focus, -input[type="checkbox"]:focus, -select:focus { - .tab-focus(); - .box-shadow(none); // override for file inputs -} - - - // INPUT SIZES // ----------- @@ -252,8 +247,7 @@ textarea[class*="span"], // GRID SIZING FOR INPUTS // ---------------------- -#grid > .input (@gridColumnWidth, @gridGutterWidth); - +#grid > .input(@gridColumnWidth, @gridGutterWidth); |