diff options
| author | Mark Otto <[email protected]> | 2013-01-12 14:16:49 -0800 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2013-01-12 14:16:49 -0800 |
| commit | a33d45f3082ac6db154aa6796eeb47a0f69f2249 (patch) | |
| tree | 0c09fb9e1247e838bcaf65fa121b15a611340c8f /less/forms.less | |
| parent | c11f41ba04791a0c408071527994dfb22c91a436 (diff) | |
| parent | 24f7df15e6a5b4b08201b3a6650340998f3ed381 (diff) | |
| download | bootstrap-a33d45f3082ac6db154aa6796eeb47a0f69f2249.tar.xz bootstrap-a33d45f3082ac6db154aa6796eeb47a0f69f2249.zip | |
Merge branch '3.0.0-wip' into bs3-flatten
Diffstat (limited to 'less/forms.less')
| -rw-r--r-- | less/forms.less | 66 |
1 files changed, 39 insertions, 27 deletions
diff --git a/less/forms.less b/less/forms.less index 5ea1d3cf1..cc7cc8a6a 100644 --- a/less/forms.less +++ b/less/forms.less @@ -292,10 +292,6 @@ textarea[class*="span"], margin-right: 0; } -.controls-row { - #grid > .input(@grid-column-width, @grid-gutter-width, @grid-row-width); -} - // Ensure input-prepend/append never wraps .input-append input[class*="span"], .input-append .uneditable-input[class*="span"], @@ -310,21 +306,6 @@ textarea[class*="span"], .uneditable-input[class*="span"] { height: @input-height; } -// Control row for multiple inputs per line -.controls-row { - .clearfix(); // Clear the float from controls -} - -// Float to collapse white-space for proper grid alignment -.controls-row [class*="span"] { - float: left; -} -// Explicity set top padding on all checkboxes/radios, not just first-child -.controls-row .checkbox[class*="span"], -.controls-row .radio[class*="span"] { - padding-top: 5px; -} - @@ -362,21 +343,17 @@ input[type="checkbox"] { // -------------------------- // Warning -.control-group.warning { +.has-warning { .formFieldState(@state-warning-text, @state-warning-text, @state-warning-background); } // Error -.control-group.error { +.has-error { .formFieldState(@state-error-text, @state-error-text, @state-error-background); } // Success -.control-group.success { +.has-success { .formFieldState(@state-success-text, @state-success-text, @state-success-background); } -// Success -.control-group.info { - .formFieldState(@state-info-text, @state-info-text, @state-info-background); -} // HTML5 invalid states // Shares styles with the .control-group.error above @@ -429,7 +406,6 @@ select:focus:invalid { - // Input groups // -------------------------------------------------- @@ -538,3 +514,39 @@ select:focus:invalid { border-radius: 0 @border-radius-base @border-radius-base 0; } } + + + +// Horizontal forms +// -------------------------------------------------- + +.form-horizontal { + + // Increase spacing between groups + .control-group { + position: relative; + margin-bottom: @line-height-base; + .clearfix(); + + input, + select, + textarea, + .uneditable-input { + margin-bottom: 0; + } + } + + // Float the labels left + .control-group > .control-label { + float: left; + width: @component-offset-horizontal - 20; + padding-top: 6px; + text-align: right; + } + + // Move over all input controls and content over + .control-group > .controls { + margin-left: @component-offset-horizontal; + } + +} |
