0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-18 10:52:19 +01:00

fix problem with error styles in forms that clashed with alert-messages by qualifying the .error with .clearfix

This commit is contained in:
Mark Otto 2011-09-11 21:43:23 -07:00
parent 0afba3867d
commit c73533ac73
3 changed files with 13 additions and 13 deletions

14
bootstrap-1.3.0.css vendored
View File

@ -6,7 +6,7 @@
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Designed and built with all the love in the world @twitter by @mdo and @fat. * 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 /* 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). * 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; box-shadow: none;
outline: 1px dotted #666; outline: 1px dotted #666;
} }
form div.error { form div.clearfix.error {
background: #fae5e3; background: #fae5e3;
padding: 10px 0; padding: 10px 0;
margin: -10px 0 10px; margin: -10px 0 10px;
@ -822,22 +822,22 @@ form div.error {
-moz-border-radius: 4px; -moz-border-radius: 4px;
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; color: #9d261d;
} }
form div.error input, form div.error textarea { form div.clearfix.error input, form div.clearfix.error textarea {
border-color: #c87872; border-color: #c87872;
-webkit-box-shadow: 0 0 3px rgba(171, 41, 32, 0.25); -webkit-box-shadow: 0 0 3px rgba(171, 41, 32, 0.25);
-moz-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); 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; border-color: #b9554d;
-webkit-box-shadow: 0 0 6px rgba(171, 41, 32, 0.5); -webkit-box-shadow: 0 0 6px rgba(171, 41, 32, 0.5);
-moz-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); 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; background: #f4c8c5;
border-color: #c87872; border-color: #c87872;
color: #b9554d; color: #b9554d;
@ -1128,7 +1128,7 @@ textarea[readonly] {
font-weight: normal; font-weight: normal;
padding-top: 0; padding-top: 0;
} }
.form-stacked div.error { .form-stacked div.clearfix.error {
padding-top: 10px; padding-top: 10px;
padding-bottom: 10px; padding-bottom: 10px;
padding-left: 10px; padding-left: 10px;

View File

@ -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,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: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;} 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.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.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.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.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 .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-mini,input.mini,textarea.mini,select.mini{width:60px;}
.input-small,input.small,textarea.small,select.small{width:90px;} .input-small,input.small,textarea.small,select.small{width:90px;}
.input-medium,input.medium,textarea.medium,select.medium{width:150px;} .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 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 .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 .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;} .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{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;} table th{padding-top:9px;font-weight:bold;vertical-align:middle;border-bottom:1px solid #ddd;}

View File

@ -153,7 +153,7 @@ select:focus {
} }
// Error styles // Error styles
form div.error { form div.clearfix.error {
background: lighten(@red, 57%); background: lighten(@red, 57%);
padding: 10px 0; padding: 10px 0;
margin: -10px 0 10px; margin: -10px 0 10px;
@ -443,7 +443,7 @@ textarea[readonly] {
} }
} }
} }
div.error { div.clearfix.error {
padding-top: 10px; padding-top: 10px;
padding-bottom: 10px; padding-bottom: 10px;
padding-left: 10px; padding-left: 10px;