From c73533ac73c5bed6f35576e8db2945ec11acb11c Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 11 Sep 2011 21:43:23 -0700 Subject: [PATCH] fix problem with error styles in forms that clashed with alert-messages by qualifying the .error with .clearfix --- bootstrap-1.3.0.css | 14 +++++++------- bootstrap-1.3.0.min.css | 8 ++++---- lib/forms.less | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/bootstrap-1.3.0.css b/bootstrap-1.3.0.css index 1a1d870f48..9b4cf1d73f 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: Sun Sep 11 21:11:10 PDT 2011 + * Date: Sun Sep 11 21:42:35 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). @@ -814,7 +814,7 @@ input[type=file]:focus, input[type=checkbox]:focus, select:focus { box-shadow: none; outline: 1px dotted #666; } -form div.error { +form div.clearfix.error { background: #fae5e3; padding: 10px 0; margin: -10px 0 10px; @@ -822,22 +822,22 @@ form div.error { -moz-border-radius: 4px; border-radius: 4px; } -form div.error > label, form div.error span.help-inline, form div.error span.help-block { +form div.clearfix.error > label, form div.clearfix.error span.help-inline, form div.clearfix.error span.help-block { color: #9d261d; } -form div.error input, form div.error textarea { +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.error input:focus, form div.error textarea:focus { +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.error .input-prepend span.add-on, form div.error .input-append span.add-on { +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; @@ -1128,7 +1128,7 @@ textarea[readonly] { font-weight: normal; padding-top: 0; } -.form-stacked div.error { +.form-stacked div.clearfix.error { padding-top: 10px; padding-bottom: 10px; padding-left: 10px; diff --git a/bootstrap-1.3.0.min.css b/bootstrap-1.3.0.min.css index dfcdd1b87b..b97a2e0a34 100644 --- a/bootstrap-1.3.0.min.css +++ b/bootstrap-1.3.0.min.css @@ -130,9 +130,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:none;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.error{background:#fae5e3;padding:10px 0;margin:-10px 0 10px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}form div.error>label,form div.error span.help-inline,form div.error span.help-block{color:#9d261d;} -form div.error input,form div.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.error input:focus,form div.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.error .input-prepend span.add-on,form div.error .input-append span.add-on{background:#f4c8c5;border-color:#c87872;color:#b9554d;} +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;} .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;} @@ -183,7 +183,7 @@ input[disabled],select[disabled],textarea[disabled],input[readonly],select[reado .form-stacked label{display:block;float:none;width:auto;font-weight:bold;text-align:left;line-height:20px;padding-top:0;} .form-stacked .clearfix{margin-bottom:9px;}.form-stacked .clearfix div.input{margin-left:0;} .form-stacked .inputs-list{margin-bottom:0;}.form-stacked .inputs-list li{padding-top:0;}.form-stacked .inputs-list li label{font-weight:normal;padding-top:0;} -.form-stacked div.error{padding-top:10px;padding-bottom:10px;padding-left:10px;margin-top:0;margin-left:-10px;} +.form-stacked div.clearfix.error{padding-top:10px;padding-bottom:10px;padding-left:10px;margin-top:0;margin-left:-10px;} .form-stacked .actions{margin-left:-20px;padding-left:20px;} table{width:100%;margin-bottom:18px;padding:0;border-collapse:separate;font-size:13px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}table th,table td{padding:10px 10px 9px;line-height:18px;text-align:left;} table th{padding-top:9px;font-weight:bold;vertical-align:middle;border-bottom:1px solid #ddd;} diff --git a/lib/forms.less b/lib/forms.less index 5b19129f82..d15dfded4e 100644 --- a/lib/forms.less +++ b/lib/forms.less @@ -153,7 +153,7 @@ select:focus { } // Error styles -form div.error { +form div.clearfix.error { background: lighten(@red, 57%); padding: 10px 0; margin: -10px 0 10px; @@ -443,7 +443,7 @@ textarea[readonly] { } } } - div.error { + div.clearfix.error { padding-top: 10px; padding-bottom: 10px; padding-left: 10px;