diff options
| author | Jonathan Camile <[email protected]> | 2012-02-28 11:06:05 +0100 |
|---|---|---|
| committer | Jonathan Camile <[email protected]> | 2012-02-28 11:06:05 +0100 |
| commit | a397130669a1462abff703989c38a63b0d2d63f0 (patch) | |
| tree | 71eab5c69724af04f68ed9fcf6edc7735e6b690a /less/forms.less | |
| parent | 15759d9e7c5284016f76c08065f407386ae7348a (diff) | |
| parent | fbebb046f7134eaed90492bfc67720337c4b625e (diff) | |
| download | bootstrap-a397130669a1462abff703989c38a63b0d2d63f0.tar.xz bootstrap-a397130669a1462abff703989c38a63b0d2d63f0.zip | |
Merge branch '2.0.2-wip' of https://github.com/twitter/bootstrap into features/warning_progress_bar
Diffstat (limited to 'less/forms.less')
| -rw-r--r-- | less/forms.less | 44 |
1 files changed, 32 insertions, 12 deletions
diff --git a/less/forms.less b/less/forms.less index 0a5fa2b86..7f02ce365 100644 --- a/less/forms.less +++ b/less/forms.less @@ -253,7 +253,7 @@ textarea[class*="span"], // GRID SIZING FOR INPUTS // ---------------------- -#inputGridSystem > .generate(@gridColumns, @gridColumnWidth, @gridGutterWidth); +#grid > .input (@gridColumnWidth, @gridGutterWidth); @@ -301,7 +301,7 @@ select:focus:required:invalid { border-color: #ee5f5b; &:focus { border-color: darken(#ee5f5b, 10%); - .box-shadow(0 0 6px lighten(#ee5f5b, 20%)); + .box-shadow(0 0 6px lighten(#ee5f5b, 20%)); } } @@ -316,6 +316,7 @@ select:focus:required:invalid { margin-bottom: @baseLineHeight; background-color: #f5f5f5; border-top: 1px solid #ddd; + .clearfix(); // Adding clearfix to allow for .pull-right button containers } // For text that needs to appear as an input but should not be an input @@ -335,17 +336,19 @@ select:focus:required:invalid { // HELP TEXT // --------- +.help-block, +.help-inline { + color: @gray; // lighten the text some for contrast +} + .help-block { display: block; // account for any element using help-block - margin-top: 5px; - margin-bottom: 0; - color: @grayLight; + margin-bottom: @baseLineHeight / 2; } .help-inline { display: inline-block; .ie7-inline-block(); - margin-bottom: 9px; vertical-align: middle; padding-left: 5px; } @@ -361,6 +364,7 @@ select:focus:required:invalid { margin-bottom: 5px; .clearfix(); // Clear the float to prevent wrapping input, + select, .uneditable-input { .border-radius(0 3px 3px 0); &:focus { @@ -381,7 +385,6 @@ select:focus:required:invalid { padding: 4px 5px; font-weight: normal; line-height: @baseLineHeight; - color: @grayLight; text-align: center; text-shadow: 0 1px 0 @white; background-color: #f5f5f5; @@ -400,13 +403,14 @@ select:focus:required:invalid { } .input-append { input, + select .uneditable-input { float: left; .border-radius(3px 0 0 3px); } .uneditable-input { border-left-color: #eee; - border-right-color: #ccc; + border-right-color: #ccc; } .add-on { margin-right: 0; @@ -470,19 +474,30 @@ select:focus:required:invalid { } // Make the prepend and append add-on vertical-align: middle; .form-search .input-append .add-on, -.form-inline .input-prepend .add-on, -.form-search .input-append .add-on, +.form-search .input-prepend .add-on, +.form-inline .input-append .add-on, .form-inline .input-prepend .add-on { vertical-align: middle; } -// Inline checkbox/radio labels +// Inline checkbox/radio labels (remove padding on left) .form-search .radio, -.form-inline .radio, .form-search .checkbox, +.form-inline .radio, .form-inline .checkbox { + padding-left: 0; margin-bottom: 0; vertical-align: middle; } +// Remove float and margin, set to inline-block +.form-search .radio input[type="radio"], +.form-search .checkbox input[type="checkbox"], +.form-inline .radio input[type="radio"], +.form-inline .checkbox input[type="checkbox"] { + float: left; + margin-left: 0; + margin-right: 3px; +} + // Margin to space out fieldsets .control-group { @@ -515,6 +530,11 @@ legend + .control-group { .controls { margin-left: 160px; } + // Remove bottom margin on block level help text since that's accounted for on .control-group + .help-block { + margin-top: @baseLineHeight / 2; + margin-bottom: 0; + } // Move over buttons in .form-actions to align with .controls .form-actions { padding-left: 160px; |
