2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-05 16:42:29 +03:00

Simplify form validation states while enabling them to be applied to one field at a time.

This commit is contained in:
Mark Otto
2012-12-26 15:57:52 -06:00
parent d0baa99aed
commit dc5c6d6be8
5 changed files with 64 additions and 138 deletions
+5 -23
View File
@@ -122,25 +122,14 @@
// FORMS
// --------------------------------------------------
// Mixin for form field states
.formFieldState(@text-color: #555, @border-color: #ccc, @background-color: #f5f5f5) {
// Set the text color
.control-label,
.help-block,
.help-inline {
// Color the label text
.control-label {
color: @text-color;
}
// Style inputs accordingly
.checkbox,
.radio,
input,
select,
textarea {
color: @text-color;
}
input,
select,
textarea {
// Set the border and box shadow on specific inputs to match
.input-with-feedback {
padding-right: 32px; // to account for the feedback icon
border-color: @border-color;
.box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
&:focus {
@@ -149,13 +138,6 @@
.box-shadow(@shadow);
}
}
// Give a small background color for input-prepend/-append
.input-prepend .add-on,
.input-append .add-on {
color: @text-color;
background-color: @background-color;
border-color: @text-color;
}
}