From 2d9b3c45d3ae5b2e4055435783d0d9428353b70a Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 7 Feb 2012 00:13:52 -0800 Subject: [PATCH] move formfieldstate mixin to mixins.less for #1785 --- docs/assets/bootstrap.zip | Bin 52562 -> 52562 bytes less/forms.less | 27 --------------------------- less/mixins.less | 35 +++++++++++++++++++++++++++++++++-- 3 files changed, 33 insertions(+), 29 deletions(-) diff --git a/docs/assets/bootstrap.zip b/docs/assets/bootstrap.zip index 707487f67c8afad856eeef33762d472c95e9bc08..d079b7cc5fb0053350e1c281682dff750276265a 100644 GIT binary patch delta 452 zcmcaKi}}(lW}X0VW)?065ZJ^xkw;P4;I4tc5fGPFa5FHnd}m}}U=aaIB9v`roSax7 zGckvg%@C|~a!-LY(`LqrGi;#(8*iWG018ZA#p%cfGRf%f=8v4g>>wdGK_jpt!@Ha7 z1lJgVgmj$Dp!zmvIDOXz2_+V&BAdO5aq`LnXEu<-fcicaR0@C;0}5?utOg6| zPEvtd2zArsl1T$f&(1^qD5zo?L%QoC6XPKxMoq zjhQBc#AHF55>I*~@y?#~hw*^AZBIEsbc0pSJLLkAgP8?X!Fy6>vixarm@1%1_~}3- h-pSM681|c 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 2b96d21e59..fffb6c1ceb 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 // --------------------------------------------------