diff options
author | Blake Embrey <hello@blakeembrey.com> | 2013-05-10 01:48:27 +0400 |
---|---|---|
committer | Blake Embrey <hello@blakeembrey.com> | 2013-05-10 01:48:27 +0400 |
commit | 9716b73f67de690d008cbfc8f1375ee85cd2539d (patch) | |
tree | 546136d10f2c53b9fa2d8e2ef5e635e00df9283e /less | |
parent | d5e6bbba27a4193f02ca488f84057cfb2eeafb36 (diff) |
Make the border-radius on input-groups to be overrides instead of resets on every size.
Diffstat (limited to 'less')
-rw-r--r-- | less/forms.less | 65 |
1 files changed, 16 insertions, 49 deletions
diff --git a/less/forms.less b/less/forms.less index 6162cd4f13..5db5f5cc3d 100644 --- a/less/forms.less +++ b/less/forms.less @@ -407,12 +407,8 @@ select:focus:invalid { .input-group-btn, .input-group input { display: table-cell; - /*margin: 0;*/ - border-radius: 0; - &.input-small { - border-radius: 0; - } - &.input-large { + + &:not(:first-child):not(:last-child) { border-radius: 0; } } @@ -435,40 +431,35 @@ select:focus:invalid { text-shadow: 0 1px 0 #fff; background-color: @gray-lighter; border: 1px solid #ccc; + border-radius: @border-radius-base; &.input-small { padding: @padding-small; font-size: @font-size-small; + border-radius: @border-radius-small; } - &.input-large { - padding: @padding-large; - font-size: @font-size-large; + &.input-large { + padding: @padding-large; + font-size: @font-size-large; + border-radius: @border-radius-large; } } // Reset rounded corners .input-group input:first-child, -.input-group-addon:first-child { - .border-left-radius(@border-radius-base); - &.input-small { - .border-left-radius(@border-radius-small); - } - &.input-large { - .border-left-radius(@border-radius-large); - } +.input-group-addon:first-child, +.input-group-btn:first-child > .btn:first-child, +.input-group-btn:first-child > .dropdown-toggle:first-child { + .border-right-radius(0); } .input-group-addon:first-child { border-right: 0; } .input-group input:last-child, -.input-group-addon:last-child { - .border-right-radius(@border-radius-base); - &.input-small { - .border-right-radius(@border-radius-small); - } - &.input-large { - .border-right-radius(@border-radius-large); - } +.input-group-addon:last-child, +.input-group-btn:last-child > .btn:last-child, +.input-group-btn:last-child > .dropdown-toggle { + .border-left-radius(0); } .input-group-addon:last-child { border-left: 0; @@ -483,7 +474,6 @@ select:focus:invalid { .input-group-btn > .btn { position: relative; float: left; // Collapse white-space - border-radius: 0; + .btn { margin-left: -1px; } @@ -494,29 +484,6 @@ select:focus:invalid { } } -// Prepended buttons -.input-group-btn:first-child { - // Round the left corners only - > .btn:first-child, - > .dropdown-toggle:first-child { - .border-left-radius(@border-radius-base); - &.btn-large { .border-left-radius(@border-radius-large); } - &.btn-small { .border-left-radius(@border-radius-small); } - } -} - -// Appended buttons -.input-group-btn:last-child { - // Round the right corners only - > .btn:last-child, - > .dropdown-toggle { - .border-right-radius(@border-radius-base); - &.btn-large { .border-right-radius(@border-radius-large); } - &.btn-small { .border-right-radius(@border-radius-small); } - } -} - - // Inline forms // -------------------------------------------------- |