From 32a690af985661f7d106984dc5ee1c211d0da2ed Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 13 Sep 2011 22:23:08 -0700 Subject: [PATCH] apply clearfix to appended input pattern to clear the floats --- bootstrap-1.3.0.css | 17 ++++++++++++++++- bootstrap-1.3.0.min.css | 2 ++ lib/forms.less | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/bootstrap-1.3.0.css b/bootstrap-1.3.0.css index 22e0de7cb5..d9df53d0e3 100644 --- a/bootstrap-1.3.0.css +++ b/bootstrap-1.3.0.css @@ -6,7 +6,7 @@ * http://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world @twitter by @mdo and @fat. - * Date: Tue Sep 13 14:40:47 PDT 2011 + * Date: Tue Sep 13 22:22:48 PDT 2011 */ /* Reset.less * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc). @@ -942,6 +942,21 @@ textarea[readonly] { .inline-inputs span { padding: 0 2px 0 1px; } +.input-prepend, .input-append { + zoom: 1; +} +.input-prepend:before, +.input-append:before, +.input-prepend:after, +.input-append:after { + display: table; + content: ""; + zoom: 1; + *display: inline; +} +.input-prepend:after, .input-append:after { + clear: both; +} .input-prepend input, .input-append input { -webkit-border-radius: 0 3px 3px 0; -moz-border-radius: 0 3px 3px 0; diff --git a/bootstrap-1.3.0.min.css b/bootstrap-1.3.0.min.css index 69689a47c2..415188b79a 100644 --- a/bootstrap-1.3.0.min.css +++ b/bootstrap-1.3.0.min.css @@ -159,6 +159,8 @@ input[disabled],select[disabled],textarea[disabled],input[readonly],select[reado .inline-inputs input.mini{width:60px;} .inline-inputs input.small{width:90px;} .inline-inputs span{padding:0 2px 0 1px;} +.input-prepend,.input-append{zoom:1;}.input-prepend:before,.input-append:before,.input-prepend:after,.input-append:after{display:table;content:"";zoom:1;*display:inline;} +.input-prepend:after,.input-append:after{clear:both;} .input-prepend input,.input-append input{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;} .input-prepend .add-on,.input-append .add-on{position:relative;z-index:2;float:left;display:block;width:auto;min-width:16px;height:18px;padding:4px 4px 4px 5px;margin-right:-1px;font-weight:normal;line-height:18px;color:#bfbfbf;text-align:center;text-shadow:0 1px 0 #ffffff;background-color:#f5f5f5;border:1px solid #ccc;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} .input-prepend .active,.input-append .active{background:#a9dba9;border-color:#46a546;} diff --git a/lib/forms.less b/lib/forms.less index e8a26bb9fd..4c307fe081 100644 --- a/lib/forms.less +++ b/lib/forms.less @@ -325,6 +325,7 @@ textarea[readonly] { // Allow us to put symbols and text within the input field for a cleaner look .input-prepend, .input-append { + .clearfix(); input { .border-radius(0 3px 3px 0); }