aboutsummaryrefslogtreecommitdiff
path: root/less/forms.less
diff options
context:
space:
mode:
authorfat <[email protected]>2013-08-04 15:45:51 -0700
committerfat <[email protected]>2013-08-04 15:45:51 -0700
commitf22a077f6ea0e0d85d9899a1f44eab4733ca6af6 (patch)
tree95c0b4c0bedd3a2ac1aa61e03d0ead12c7827f4f /less/forms.less
parentb1d21731adfc04adb654133988f3c8e444d8b240 (diff)
parentb6390d298aa71e6dccb10e539097fbc7aaa45b8a (diff)
downloadbootstrap-f22a077f6ea0e0d85d9899a1f44eab4733ca6af6.tar.xz
bootstrap-f22a077f6ea0e0d85d9899a1f44eab4733ca6af6.zip
Merge branch '3.0.0-wip' of github.com:twbs/bootstrap into 3.0.0-wip
Diffstat (limited to 'less/forms.less')
-rw-r--r--less/forms.less56
1 files changed, 50 insertions, 6 deletions
diff --git a/less/forms.less b/less/forms.less
index 494d328c0..127f6a67a 100644
--- a/less/forms.less
+++ b/less/forms.less
@@ -218,14 +218,14 @@ input[type="number"] {
// horizontal sizing, wrap controls in the predefined grid classes. `<select>`
// element gets special love because it's special, and that's a fact!
-.input-large {
+.input-lg {
height: @input-height-large;
padding: @padding-large-vertical @padding-large-horizontal;
font-size: @font-size-large;
line-height: @line-height-large;
border-radius: @border-radius-large;
}
-.input-small {
+.input-sm {
height: @input-height-small;
padding: @padding-small-vertical @padding-small-horizontal;
font-size: @font-size-small;
@@ -234,18 +234,18 @@ input[type="number"] {
}
select {
- &.input-large {
+ &.input-lg {
height: @input-height-large;
line-height: @input-height-large;
}
- &.input-small {
+ &.input-sm {
height: @input-height-small;
line-height: @input-height-small;
}
}
textarea {
- &.input-large,
- &.input-small {
+ &.input-lg,
+ &.input-sm {
height: auto;
}
}
@@ -280,3 +280,47 @@ textarea {
margin-bottom: 10px;
color: lighten(@text-color, 25%); // lighten the text some for contrast
}
+
+
+
+// Inline forms
+//
+// Make forms appear inline(-block).
+
+.form-inline {
+ .form-control,
+ .radio,
+ .checkbox {
+ display: inline-block;
+ }
+ .radio,
+ .checkbox {
+ margin-top: 0;
+ margin-bottom: 0;
+ }
+}
+
+
+// Horizontal forms
+//
+// Horizontal forms are built on grid classes and allow you to create forms with
+// labels on the left and inputs on the right.
+
+.form-horizontal .control-label,
+.form-horizontal .radio-inline,
+.form-horizontal .checkbox-inline {
+ padding-top: 9px;
+}
+
+.form-horizontal {
+ .form-group {
+ .make-row();
+ }
+}
+
+// Only right align form labels here when the columns stop stacking
+@media (min-width: @screen-tablet) {
+ .form-horizontal .control-label {
+ text-align: right;
+ }
+}