aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2012-02-07 00:13:52 -0800
committerMark Otto <[email protected]>2012-02-07 00:13:52 -0800
commit2d9b3c45d3ae5b2e4055435783d0d9428353b70a (patch)
tree23a0c82dca851193360391c5d64eb98c6037c03e
parent3b57fba754c2536e9c8a8bcf10b24f3e2cec4677 (diff)
downloadbootstrap-2d9b3c45d3ae5b2e4055435783d0d9428353b70a.tar.xz
bootstrap-2d9b3c45d3ae5b2e4055435783d0d9428353b70a.zip
move formfieldstate mixin to mixins.less for #1785
-rw-r--r--docs/assets/bootstrap.zipbin52562 -> 52562 bytes
-rw-r--r--less/forms.less27
-rw-r--r--less/mixins.less35
3 files changed, 33 insertions, 29 deletions
diff --git a/docs/assets/bootstrap.zip b/docs/assets/bootstrap.zip
index 707487f67..d079b7cc5 100644
--- a/docs/assets/bootstrap.zip
+++ b/docs/assets/bootstrap.zip
Binary files differ
diff --git a/less/forms.less b/less/forms.less
index 3f68df01c..5bce4cebd 100644
--- a/less/forms.less
+++ b/less/forms.less
@@ -259,33 +259,6 @@ textarea[readonly] {
// FORM FIELD FEEDBACK STATES
// --------------------------
-// Mixin for form field states
-.formFieldState(@textColor: #555, @borderColor: #ccc, @backgroundColor: #f5f5f5) {
- // Set the text color
- > label,
- .help-block,
- .help-inline {
- color: @textColor;
- }
- // Style inputs accordingly
- input,
- select,
- textarea {
- color: @textColor;
- border-color: @borderColor;
- &:focus {
- border-color: darken(@borderColor, 10%);
- .box-shadow(0 0 6px lighten(@borderColor, 20%));
- }
- }
- // Give a small background color for input-prepend/-append
- .input-prepend .add-on,
- .input-append .add-on {
- color: @textColor;
- background-color: @backgroundColor;
- border-color: @textColor;
- }
-}
// Warning
.control-group.warning {
.formFieldState(@warningText, @warningText, @warningBackground);
diff --git a/less/mixins.less b/less/mixins.less
index 2b96d21e5..fffb6c1ce 100644
--- a/less/mixins.less
+++ b/less/mixins.less
@@ -244,8 +244,6 @@
}
}
-
-
// Input grid system
// -------------------------
#inputGridSystem {
@@ -274,6 +272,39 @@
+// Form field states (used in forms.less)
+// --------------------------------------------------
+
+// Mixin for form field states
+.formFieldState(@textColor: #555, @borderColor: #ccc, @backgroundColor: #f5f5f5) {
+ // Set the text color
+ > label,
+ .help-block,
+ .help-inline {
+ color: @textColor;
+ }
+ // Style inputs accordingly
+ input,
+ select,
+ textarea {
+ color: @textColor;
+ border-color: @borderColor;
+ &:focus {
+ border-color: darken(@borderColor, 10%);
+ .box-shadow(0 0 6px lighten(@borderColor, 20%));
+ }
+ }
+ // Give a small background color for input-prepend/-append
+ .input-prepend .add-on,
+ .input-append .add-on {
+ color: @textColor;
+ background-color: @backgroundColor;
+ border-color: @textColor;
+ }
+}
+
+
+
// CSS3 PROPERTIES
// --------------------------------------------------