diff options
| author | fat <[email protected]> | 2014-06-23 23:08:23 -0700 |
|---|---|---|
| committer | fat <[email protected]> | 2014-06-23 23:08:23 -0700 |
| commit | 0aa01f63e33e0fb4c0c770dba7d2a631b9b562d3 (patch) | |
| tree | 7b88c388d526ada7b564f1faf44cda92276f2722 /less/forms.less | |
| parent | f071549c8408241b88a95192e477816d2402eb6e (diff) | |
| parent | b31c35b63629ec750f338a646f6b730bd675b734 (diff) | |
| download | bootstrap-0aa01f63e33e0fb4c0c770dba7d2a631b9b562d3.tar.xz bootstrap-0aa01f63e33e0fb4c0c770dba7d2a631b9b562d3.zip | |
Merge branch 'master' into fix-13386
Conflicts:
js/carousel.js
Diffstat (limited to 'less/forms.less')
| -rw-r--r-- | less/forms.less | 60 |
1 files changed, 45 insertions, 15 deletions
diff --git a/less/forms.less b/less/forms.less index 2f629b0a1..841762f4c 100644 --- a/less/forms.less +++ b/less/forms.less @@ -281,6 +281,26 @@ input[type="checkbox"] { } +// Static form control text +// +// Apply class to a `p` element to make any string of text align with labels in +// a horizontal form layout. + +.form-control-static { + // Size it appropriately next to real form controls + padding-top: (@padding-base-vertical + 1); + padding-bottom: (@padding-base-vertical + 1); + // Remove default margin from `p` + margin-bottom: 0; + + &.input-lg, + &.input-sm { + padding-left: 0; + padding-right: 0; + } +} + + // Form control sizing // // Build on `.form-control` with modifier classes to decrease or increase the @@ -349,16 +369,6 @@ input[type="checkbox"] { } -// Static form control text -// -// Apply class to a `p` element to make any string of text align with labels in -// a horizontal form layout. - -.form-control-static { - margin-bottom: 0; // Remove default margin from `p` -} - - // Help text // // Apply to any element you wish to create light text for placement immediately @@ -484,11 +494,6 @@ input[type="checkbox"] { .make-row(); } - .form-control-static { - padding-top: (@padding-base-vertical + 1); - padding-bottom: (@padding-base-vertical + 1); - } - // Reset spacing and right align labels, but scope to media queries so that // labels on narrow viewports stack the same as a default form example. @media (min-width: @screen-sm-min) { @@ -507,4 +512,29 @@ input[type="checkbox"] { top: 0; right: (@grid-gutter-width / 2); } + + // Form group sizes + // + // Quick utility class for applying `.input-lg` and `.input-sm` styles to the + // inputs and labels within a `.form-group`. + .form-group-lg { + @media (min-width: @screen-sm-min) { + .control-label { + padding-top: ((@padding-large-vertical * @line-height-large) + 1); + } + } + .form-control { + &:extend(.input-lg); + } + } + .form-group-sm { + @media (min-width: @screen-sm-min) { + .control-label { + padding-top: (@padding-small-vertical + 1); + } + } + .form-control { + &:extend(.input-sm); + } + } } |
