From 91eef351e40c7833041e68fdddba8c2b43ebc702 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 11 Mar 2012 22:58:14 -0700 Subject: remove need for floats and IE hacks for input-prepend and input-append--boom --- less/forms.less | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'less/forms.less') diff --git a/less/forms.less b/less/forms.less index 280c63d6b..614d07ad7 100644 --- a/less/forms.less +++ b/less/forms.less @@ -362,7 +362,6 @@ select:focus:required:invalid { .input-prepend, .input-append { margin-bottom: 5px; - .clearfix(); // Clear the float to prevent wrapping input, select, .uneditable-input { @@ -376,8 +375,7 @@ select:focus:required:invalid { border-left-color: #ccc; } .add-on { - float: left; - display: block; + display: inline-block; width: auto; min-width: 16px; height: @baseLineHeight; @@ -387,6 +385,7 @@ select:focus:required:invalid { line-height: @baseLineHeight; text-align: center; text-shadow: 0 1px 0 @white; + vertical-align: middle; background-color: @grayLighter; border: 1px solid #ccc; .border-radius(3px 0 0 3px); @@ -396,16 +395,10 @@ select:focus:required:invalid { border-color: @green; } } -.input-prepend { - .add-on { - *margin-top: 1px; /* IE6-7 */ - } -} .input-append { input, select .uneditable-input { - float: left; .border-radius(3px 0 0 3px); } .uneditable-input { @@ -417,15 +410,6 @@ select:focus:required:invalid { margin-left: -1px; .border-radius(0 3px 3px 0); } - input:first-child { - // In IE7, having a hasLayout container (from clearfix's zoom:1) can make the first input - // inherit the sum of its ancestors' margins. - *margin-left: -160px; - - &+.add-on { - *margin-left: -21px; - } - } } -- cgit v1.2.3