]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Moves buttonBackground to mixins (issue 1292)
authorPete Hopkins <phopkins@twitter.com>
Fri, 27 Jan 2012 21:39:27 +0000 (16:39 -0500)
committerPete Hopkins <phopkins@twitter.com>
Fri, 27 Jan 2012 21:39:27 +0000 (16:39 -0500)
less/buttons.less
less/mixins.less

index 06a7d91bdfbf2d08cd042059d1d6d759282c2b7b..843af6c62283d2c9f3545d349c2cc873fd627c08 100644 (file)
   }
 }
 
-
-// Mixin for generating button backgrounds
-// ---------------------------------------
-.buttonBackground(@startColor, @endColor) {
-  // gradientBar will set the background to a pleasing blend of these, to support IE<=9
-  .gradientBar(@startColor, @endColor);
-
-  // in these cases the gradient won't cover the background, so we override
-  &:hover, &:active, &.active, &.disabled {
-    background-color: @endColor;
-  }
-
-  // called out separately because IE8 would ignore otherwise
-  &[disabled] {
-    background-color: @endColor;
-  }
-
-  // IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves
-  &:active,
-  &.active {
-    background-color: darken(@endColor, 10%) e("\9");
-  }
-}
-
-
 // Base styles
 // -----------
 
index 745fe33d950e3b439fbc8ed11002f5281e77dccb..bbbba1e025f945338766fd3aa01ac4095efa9c05 100644 (file)
 }
 
 
+// Mixin for generating button backgrounds
+// ---------------------------------------
+.buttonBackground(@startColor, @endColor) {
+  // gradientBar will set the background to a pleasing blend of these, to support IE<=9
+  .gradientBar(@startColor, @endColor);
+
+  // in these cases the gradient won't cover the background, so we override
+  &:hover, &:active, &.active, &.disabled {
+    background-color: @endColor;
+  }
+
+  // called out separately because IE8 would ignore otherwise
+  &[disabled] {
+    background-color: @endColor;
+  }
+
+  // IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves
+  &:active,
+  &.active {
+    background-color: darken(@endColor, 10%) e("\9");
+  }
+}
+
 
 // COMPONENT MIXINS
 // --------------------------------------------------