Commit 7728f7b8 authored by Mark Otto's avatar Mark Otto
Browse files

add html5 invalid state for super fancy errors via browser

parent b6d50c89
16 merge requests!14752.0 wip,!1403warningText and warningBackground docs fix,!985Fix id anchor javascript,!13512.0 wip - relative font sizes,!1315[2.0-wip] Fix mustache glob when building,!1268[wip-2.0] IE 7/8 Typehead JS fix,!12362.0 wip - Fix for issue #1202,!1219Removed dotted outline on navbar dropdown menu,!1210Missing icon class from examples,!1195Fixed display of secondary container,!1090Fixed typo,!1084Default `.border-radius-custom` values,!1064Typo Fix in tables.less,!10572.0 wip,!1052Missing data attribute to close modal,!10212.0 wip
Showing with 25 additions and 1 deletion
+25 -1
......@@ -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: Sat Jan 7 04:20:37 PST 2012
* Date: Sat Jan 7 04:26:09 PST 2012
*/
html, body {
margin: 0;
......@@ -824,6 +824,16 @@ textarea[readonly] {
background-color: #bcddbc;
border-color: #468847;
}
input:invalid, textarea:invalid, select:invalid {
color: #b94a48;
border-color: #ee5f5b;
}
input:invalid:focus, textarea:invalid:focus, select:invalid:focus {
border-color: #e9322d;
-webkit-box-shadow: 0 0 6px #f8b9b7;
-moz-box-shadow: 0 0 6px #f8b9b7;
box-shadow: 0 0 6px #f8b9b7;
}
.form-actions {
padding: 17px 20px 18px;
margin-top: 18px;
......
......@@ -155,6 +155,7 @@ input[disabled],select[disabled],textarea[disabled],input[readonly],select[reado
.control-group.success>label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847;}
.control-group.success input,.control-group.success textarea{color:#468847;border-color:#57a957;}.control-group.success input:focus,.control-group.success textarea:focus{border-color:#458845;-webkit-box-shadow:0 0 6px #9acc9a;-moz-box-shadow:0 0 6px #9acc9a;box-shadow:0 0 6px #9acc9a;}
.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#bcddbc;border-color:#468847;}
input:invalid,textarea:invalid,select:invalid{color:#b94a48;border-color:#ee5f5b;}input:invalid:focus,textarea:invalid:focus,select:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;}
.form-actions{padding:17px 20px 18px;margin-top:18px;margin-bottom:18px;background-color:#f5f5f5;border-top:1px solid #ddd;}
.uneditable-input{display:block;background-color:#ffffff;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;}
input:-moz-placeholder{color:#999999;}
......
......@@ -299,6 +299,19 @@ textarea[readonly] {
.formFieldState(#468847, #57a957, lighten(#57a957, 30%));
}
// HTML5 invalid states
// Shares styles with the .control-group.error above
input:invalid,
textarea:invalid,
select:invalid {
color: #b94a48;
border-color: #ee5f5b;
&:focus {
border-color: darken(#ee5f5b, 10%);
.box-shadow(0 0 6px lighten(#ee5f5b, 20%));
}
}
// FORM ACTIONS
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment