aboutsummaryrefslogtreecommitdiff
path: root/lib/forms.less
diff options
context:
space:
mode:
authorJacob Thornton <[email protected]>2011-09-02 21:04:25 -0700
committerJacob Thornton <[email protected]>2011-09-02 21:04:25 -0700
commit0e13f8dca10ff19397d577b0916a72129183bfeb (patch)
tree94840c00948c1b9844be7db18b8c1623100639bd /lib/forms.less
parentb4a84e1e7de1e5448cf9adc61a1a02badec80439 (diff)
parent2589c0ac4ecc86feed81cfc5df344e0eb78cda64 (diff)
downloadbootstrap-0e13f8dca10ff19397d577b0916a72129183bfeb.tar.xz
bootstrap-0e13f8dca10ff19397d577b0916a72129183bfeb.zip
Merge branch 'master' of github.com:twitter/bootstrap into js-examples
Conflicts: bootstrap-1.2.0.css bootstrap-1.2.0.min.css lib/patterns.less lib/scaffolding.less
Diffstat (limited to 'lib/forms.less')
-rw-r--r--lib/forms.less52
1 files changed, 38 insertions, 14 deletions
diff --git a/lib/forms.less b/lib/forms.less
index 88ae08d8a..a16844ab1 100644
--- a/lib/forms.less
+++ b/lib/forms.less
@@ -61,29 +61,58 @@ input[type=radio] {
}
// Inputs, Textareas, Selects
-input[type=text],
-input[type=password],
+input,
textarea,
select,
.uneditable-input {
display: inline-block;
width: 210px;
+ height: @baseline;
padding: 4px;
font-size: 13px;
line-height: @baseline;
- height: @baseline;
color: @gray;
border: 1px solid #ccc;
.border-radius(3px);
}
+
+/* mini reset for non-html5 file types */
+input[type=checkbox],
+input[type=radio] {
+ width: auto;
+ height: auto;
+ padding: 0;
+ margin: 3px 0;
+ *margin-top: 0; /* IE6-7 */
+ line-height: normal;
+ border: none;
+}
+
+input[type=file] {
+ background-color: #fff;
+ padding: initial;
+ border: initial;
+ line-height: initial;
+ .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 +129,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 +155,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 +247,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 +264,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 +295,7 @@ input.disabled {
}
}
.input-append {
- input[type=text],
- input[type=password] {
+ input {
float: left;
.border-radius(3px 0 0 3px);
}