2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

add reset filter to preboot for turning off gradients in IE when necessary; make :disabled [disabled] for crossbrowser usage

This commit is contained in:
Mark Otto
2011-09-02 12:19:43 -07:00
parent ac57331323
commit 8c1e60c638
5 changed files with 28 additions and 21 deletions
+4 -3
View File
@@ -429,8 +429,7 @@ footer {
// Button Base
cursor: pointer;
display: inline-block;
//#gradient > .vertical-three-colors(#fff, #fff, 0.25, darken(#fff, 10%));
#gradient > .vertical(#ffffff, #eeeeee);
#gradient > .vertical-three-colors(#ffffff, #ffffff, 0.25, darken(#ffffff, 10%));
padding: 5px 14px 6px;
text-shadow: 0 1px 1px rgba(255,255,255,.75);
color: #333;
@@ -465,14 +464,16 @@ footer {
&.disabled {
cursor: default;
background-image: none;
.reset-filter();
.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;
.reset-filter();
.opacity(65);
.box-shadow(none);
}
+7 -2
View File
@@ -240,7 +240,7 @@
background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+
background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10
background-image: linear-gradient(top, @startColor, @endColor); // The standard
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\9",@startColor,@endColor));
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\9",@startColor,@endColor)); // IE8 and down
}
.directional (@startColor: #555, @endColor: #333, @deg: 45deg) {
background-color: @endColor;
@@ -260,10 +260,15 @@
background-image: -ms-linear-gradient(@startColor, @midColor @colorStop, @endColor);
background-image: -o-linear-gradient(@startColor, @midColor @colorStop, @endColor);
background-image: linear-gradient(@startColor, @midColor @colorStop, @endColor);
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\9",@startColor,@endColor));
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\9",@startColor,@endColor)); // IE8 and down, gets no color-stop at all for proper fallback
}
}
// Reset filters for IE
.reset-filter() {
filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)"));
}
// Opacity
.opacity(@opacity: 100) {
filter: e(%("alpha(opacity=%d)", @opacity));