From aaa530c27e387ff266345aee026b50f779be88bc Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 27 Jan 2012 18:44:17 -0800 Subject: [PATCH] combined .disabled and [disabled] and confirmed in ie7/8 --- docs/assets/css/bootstrap.css | 30 ++++++------------------------ less/buttons.less | 10 +--------- less/mixins.less | 7 +------ 3 files changed, 8 insertions(+), 39 deletions(-) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index a6dd95e84e..80f078be7a 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -6,7 +6,7 @@ * http://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world @twitter by @mdo and @fat. - * Date: Fri Jan 27 18:33:07 PST 2012 + * Date: Fri Jan 27 18:43:22 PST 2012 */ article, aside, @@ -2498,9 +2498,7 @@ table .span12 { .btn.primary:hover, .btn.primary:active, .btn.primary.active, -.btn.primary.disabled { - background-color: #0055cc; -} +.btn.primary.disabled, .btn.primary[disabled] { background-color: #0055cc; } @@ -2522,9 +2520,7 @@ table .span12 { .btn.danger:hover, .btn.danger:active, .btn.danger.active, -.btn.danger.disabled { - background-color: #c43c35; -} +.btn.danger.disabled, .btn.danger[disabled] { background-color: #c43c35; } @@ -2546,9 +2542,7 @@ table .span12 { .btn.success:hover, .btn.success:active, .btn.success.active, -.btn.success.disabled { - background-color: #57a957; -} +.btn.success.disabled, .btn.success[disabled] { background-color: #57a957; } @@ -2570,9 +2564,7 @@ table .span12 { .btn.info:hover, .btn.info:active, .btn.info.active, -.btn.info.disabled { - background-color: #339bb9; -} +.btn.info.disabled, .btn.info[disabled] { background-color: #339bb9; } @@ -2636,17 +2628,7 @@ table .span12 { background-color: #e6e6e6; background-color: #d9d9d9 \9; } -.btn.disabled { - cursor: default; - background-image: none; - background-color: #e6e6e6; - opacity: 0.65; - filter: alpha(opacity=65); - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} -.btn[disabled] { +.btn.disabled, .btn[disabled] { cursor: default; background-image: none; background-color: #e6e6e6; diff --git a/less/buttons.less b/less/buttons.less index f372b84483..ec23781ccc 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -82,16 +82,8 @@ background-color: darken(@white, 10%); background-color: darken(@white, 15%) e("\9"); } - &.disabled { - cursor: default; - background-image: none; - background-color: darken(@white, 10%); - .opacity(65); - .box-shadow(none); - } + &.disabled, &[disabled] { - // disabled pseudo can't be included with .disabled - // def because IE8 and below will drop it ;_; cursor: default; background-image: none; background-color: darken(@white, 10%); diff --git a/less/mixins.less b/less/mixins.less index 65b7dbefc8..2ed28ac3f3 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -360,12 +360,7 @@ .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] { + &:hover, &:active, &.active, &.disabled, &[disabled] { background-color: @endColor; }