1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-12 00:24:03 +02:00

combined .disabled and [disabled] and confirmed in ie7/8

This commit is contained in:
Mark Otto
2012-01-27 18:44:17 -08:00
parent 7e72eb5063
commit aaa530c27e
3 changed files with 8 additions and 39 deletions

View File

@@ -6,7 +6,7 @@
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Designed and built with all the love in the world @twitter by @mdo and @fat. * 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, article,
aside, aside,
@@ -2498,9 +2498,7 @@ table .span12 {
.btn.primary:hover, .btn.primary:hover,
.btn.primary:active, .btn.primary:active,
.btn.primary.active, .btn.primary.active,
.btn.primary.disabled { .btn.primary.disabled,
background-color: #0055cc;
}
.btn.primary[disabled] { .btn.primary[disabled] {
background-color: #0055cc; background-color: #0055cc;
} }
@@ -2522,9 +2520,7 @@ table .span12 {
.btn.danger:hover, .btn.danger:hover,
.btn.danger:active, .btn.danger:active,
.btn.danger.active, .btn.danger.active,
.btn.danger.disabled { .btn.danger.disabled,
background-color: #c43c35;
}
.btn.danger[disabled] { .btn.danger[disabled] {
background-color: #c43c35; background-color: #c43c35;
} }
@@ -2546,9 +2542,7 @@ table .span12 {
.btn.success:hover, .btn.success:hover,
.btn.success:active, .btn.success:active,
.btn.success.active, .btn.success.active,
.btn.success.disabled { .btn.success.disabled,
background-color: #57a957;
}
.btn.success[disabled] { .btn.success[disabled] {
background-color: #57a957; background-color: #57a957;
} }
@@ -2570,9 +2564,7 @@ table .span12 {
.btn.info:hover, .btn.info:hover,
.btn.info:active, .btn.info:active,
.btn.info.active, .btn.info.active,
.btn.info.disabled { .btn.info.disabled,
background-color: #339bb9;
}
.btn.info[disabled] { .btn.info[disabled] {
background-color: #339bb9; background-color: #339bb9;
} }
@@ -2636,17 +2628,7 @@ table .span12 {
background-color: #e6e6e6; background-color: #e6e6e6;
background-color: #d9d9d9 \9; background-color: #d9d9d9 \9;
} }
.btn.disabled { .btn.disabled, .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] {
cursor: default; cursor: default;
background-image: none; background-image: none;
background-color: #e6e6e6; background-color: #e6e6e6;

View File

@@ -82,16 +82,8 @@
background-color: darken(@white, 10%); background-color: darken(@white, 10%);
background-color: darken(@white, 15%) e("\9"); background-color: darken(@white, 15%) e("\9");
} }
&.disabled { &.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; cursor: default;
background-image: none; background-image: none;
background-color: darken(@white, 10%); background-color: darken(@white, 10%);

View File

@@ -360,12 +360,7 @@
.gradientBar(@startColor, @endColor); .gradientBar(@startColor, @endColor);
// in these cases the gradient won't cover the background, so we override // in these cases the gradient won't cover the background, so we override
&:hover, &:active, &.active, &.disabled { &:hover, &:active, &.active, &.disabled, &[disabled] {
background-color: @endColor;
}
// called out separately because IE8 would ignore otherwise
&[disabled] {
background-color: @endColor; background-color: @endColor;
} }