From 1c9db106fadd544d8af93a60c128842f95724f03 Mon Sep 17 00:00:00 2001 From: Pete Hopkins Date: Fri, 27 Jan 2012 16:39:27 -0500 Subject: [PATCH] Moves buttonBackground to mixins (issue 1292) --- less/buttons.less | 25 ------------------------- less/mixins.less | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/less/buttons.less b/less/buttons.less index 06a7d91bdf..843af6c622 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -35,31 +35,6 @@ } } - -// 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 // ----------- diff --git a/less/mixins.less b/less/mixins.less index 745fe33d95..bbbba1e025 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -339,6 +339,29 @@ } +// 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 // --------------------------------------------------