From 948c59ddb39af2086efeb5c39b3e6b18e8bcb75f Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 3 Oct 2011 21:43:53 -0700 Subject: [PATCH] resolve issue with form fields and errors causing no space between fields with consecutive errors; needs more work, but will address later --- bootstrap.css | 16 ++++++++-------- bootstrap.min.css | 6 +++--- docs/index.html | 9 ++++++++- lib/forms.less | 4 ++-- 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/bootstrap.css b/bootstrap.css index f1a5cc7d36..d5a05d9fda 100644 --- a/bootstrap.css +++ b/bootstrap.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: Thu Sep 22 12:52:42 PDT 2011 + * Date: Mon Oct 3 21:43:20 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). @@ -173,7 +173,7 @@ textarea { /* Variables.less * Variables to customize the look and feel of Bootstrap * ----------------------------------------------------- */ -/* Variables.less +/* Mixins.less * Snippets of reusable CSS to develop faster and keep code readable * ----------------------------------------------------------------- */ /* @@ -719,30 +719,30 @@ input[type=file]:focus, input[type=checkbox]:focus, select:focus { box-shadow: none; outline: 1px dotted #666; } -form div.clearfix.error { +form .clearfix.error { background: #fae5e3; padding: 10px 0; - margin: -10px 0 10px; + margin: 10px 0; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } -form div.clearfix.error > label, form div.clearfix.error span.help-inline, form div.clearfix.error span.help-block { +form .clearfix.error > label, form .clearfix.error span.help-inline, form .clearfix.error span.help-block { color: #9d261d; } -form div.clearfix.error input, form div.clearfix.error textarea { +form .clearfix.error input, form .clearfix.error textarea { border-color: #c87872; -webkit-box-shadow: 0 0 3px rgba(171, 41, 32, 0.25); -moz-box-shadow: 0 0 3px rgba(171, 41, 32, 0.25); box-shadow: 0 0 3px rgba(171, 41, 32, 0.25); } -form div.clearfix.error input:focus, form div.clearfix.error textarea:focus { +form .clearfix.error input:focus, form .clearfix.error textarea:focus { border-color: #b9554d; -webkit-box-shadow: 0 0 6px rgba(171, 41, 32, 0.5); -moz-box-shadow: 0 0 6px rgba(171, 41, 32, 0.5); box-shadow: 0 0 6px rgba(171, 41, 32, 0.5); } -form div.clearfix.error .input-prepend span.add-on, form div.clearfix.error .input-append span.add-on { +form .clearfix.error .input-prepend span.add-on, form .clearfix.error .input-append span.add-on { background: #f4c8c5; border-color: #c87872; color: #b9554d; diff --git a/bootstrap.min.css b/bootstrap.min.css index b555c6553c..0755122ce7 100644 --- a/bootstrap.min.css +++ b/bootstrap.min.css @@ -125,9 +125,9 @@ textarea{height:auto;} input,textarea{-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;-ms-transition:border linear 0.2s,box-shadow linear 0.2s;-o-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);} input:focus,textarea:focus{outline:0;border-color:rgba(82, 168, 236, 0.8);-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);} input[type=file]:focus,input[type=checkbox]:focus,select:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;outline:1px dotted #666;} -form div.clearfix.error{background:#fae5e3;padding:10px 0;margin:-10px 0 10px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}form div.clearfix.error>label,form div.clearfix.error span.help-inline,form div.clearfix.error span.help-block{color:#9d261d;} -form div.clearfix.error input,form div.clearfix.error textarea{border-color:#c87872;-webkit-box-shadow:0 0 3px rgba(171, 41, 32, 0.25);-moz-box-shadow:0 0 3px rgba(171, 41, 32, 0.25);box-shadow:0 0 3px rgba(171, 41, 32, 0.25);}form div.clearfix.error input:focus,form div.clearfix.error textarea:focus{border-color:#b9554d;-webkit-box-shadow:0 0 6px rgba(171, 41, 32, 0.5);-moz-box-shadow:0 0 6px rgba(171, 41, 32, 0.5);box-shadow:0 0 6px rgba(171, 41, 32, 0.5);} -form div.clearfix.error .input-prepend span.add-on,form div.clearfix.error .input-append span.add-on{background:#f4c8c5;border-color:#c87872;color:#b9554d;} +form .clearfix.error{background:#fae5e3;padding:10px 0;margin:10px 0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}form .clearfix.error>label,form .clearfix.error span.help-inline,form .clearfix.error span.help-block{color:#9d261d;} +form .clearfix.error input,form .clearfix.error textarea{border-color:#c87872;-webkit-box-shadow:0 0 3px rgba(171, 41, 32, 0.25);-moz-box-shadow:0 0 3px rgba(171, 41, 32, 0.25);box-shadow:0 0 3px rgba(171, 41, 32, 0.25);}form .clearfix.error input:focus,form .clearfix.error textarea:focus{border-color:#b9554d;-webkit-box-shadow:0 0 6px rgba(171, 41, 32, 0.5);-moz-box-shadow:0 0 6px rgba(171, 41, 32, 0.5);box-shadow:0 0 6px rgba(171, 41, 32, 0.5);} +form .clearfix.error .input-prepend span.add-on,form .clearfix.error .input-append span.add-on{background:#f4c8c5;border-color:#c87872;color:#b9554d;} .input-mini,input.mini,textarea.mini,select.mini{width:60px;} .input-small,input.small,textarea.small,select.small{width:90px;} .input-medium,input.medium,textarea.medium,select.medium{width:150px;} diff --git a/docs/index.html b/docs/index.html index 292d919c0d..c75ecc837b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1036,7 +1036,14 @@
- + +
+ + Small snippet of help text +
+
+
+
Small snippet of help text diff --git a/lib/forms.less b/lib/forms.less index 0da4037df7..77e1ce24b6 100644 --- a/lib/forms.less +++ b/lib/forms.less @@ -159,10 +159,10 @@ select:focus { } // Error styles -form div.clearfix.error { +form .clearfix.error { background: lighten(@red, 57%); padding: 10px 0; - margin: -10px 0 10px; + margin: 10px 0; .border-radius(4px); @error-text: desaturate(lighten(@red, 25%), 25%); > label, -- 2.47.3