diff options
| author | Jacob Thornton <[email protected]> | 2011-09-01 22:53:24 -0700 |
|---|---|---|
| committer | Jacob Thornton <[email protected]> | 2011-09-01 22:53:24 -0700 |
| commit | 72da5dd54d154bb2b87b0ec23107eca775c72f51 (patch) | |
| tree | e1528ba6e0e673252c4a1065d72e6c507f461433 /lib/forms.less | |
| parent | f6a4dd95b62771b105530c85a98901f06bfecdd7 (diff) | |
| download | bootstrap-72da5dd54d154bb2b87b0ec23107eca775c72f51.tar.xz bootstrap-72da5dd54d154bb2b87b0ec23107eca775c72f51.zip | |
for html5 style all inputs -- then unstyle checkbox, radio, button, reset, submit
Diffstat (limited to 'lib/forms.less')
| -rw-r--r-- | lib/forms.less | 46 |
1 files changed, 33 insertions, 13 deletions
diff --git a/lib/forms.less b/lib/forms.less index 88ae08d8a..d79decd24 100644 --- a/lib/forms.less +++ b/lib/forms.less @@ -61,8 +61,7 @@ input[type=radio] { } // Inputs, Textareas, Selects -input[type=text], -input[type=password], +input, textarea, select, .uneditable-input { @@ -76,14 +75,40 @@ select, border: 1px solid #ccc; .border-radius(3px); } + +/* mini reset for non-html5 file types */ +input[type=checkbox], +input[type=radio] { + width: auto; + padding: 0; + line-height: normal; + height: auto; + margin: 3px 0; +} + +input[type=file] { + border: 0; + padding: 0; + .box-shadow(none); +} + +input[type=button], +input[type=reset], +input[type=submit] { + width: auto; + height: auto; +} + select, input[type=file] { height: @baseline * 1.5; line-height: @baseline * 1.5; } + textarea { height: auto; } + .uneditable-input { background-color: #eee; display: block; @@ -100,15 +125,13 @@ textarea { } // Focus states -input[type=text], -input[type=password], +input, select, textarea { @transition: border linear .2s, box-shadow linear .2s; .transition(@transition); .box-shadow(inset 0 1px 3px rgba(0,0,0,.1)); } -input[type=text]:focus, -input[type=password]:focus, +input:focus, textarea:focus { outline: none; border-color: rgba(82,168,236,.8); @@ -128,8 +151,7 @@ form div.error { span.help-block { color: @red; } - input[type=text], - input[type=password], + input, textarea { border-color: @error-text; .box-shadow(0 0 3px rgba(171,41,32,.25)); @@ -221,7 +243,7 @@ input.disabled { // Inline Fields (input fields that appear as inline objects .inline-inputs { color: @gray; - span, input[type=text] { + span, input { display: inline-block; } input.mini { @@ -238,8 +260,7 @@ input.disabled { // Allow us to put symbols and text within the input field for a cleaner look .input-prepend, .input-append { - input[type=text], - input[type=password] { + input { .border-radius(0 3px 3px 0); } .add-on { @@ -270,8 +291,7 @@ input.disabled { } } .input-append { - input[type=text], - input[type=password] { + input { float: left; .border-radius(3px 0 0 3px); } |
