Skip to content

Instantly share code, notes, and snippets.

@knalli
Created July 24, 2011 19:20
Show Gist options
  • Save knalli/1102972 to your computer and use it in GitHub Desktop.
Save knalli/1102972 to your computer and use it in GitHub Desktop.
CSS3: SASS, Compass, PIE und IE
div.header-chrome {
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #00346e), color-stop(100%, #001c3b));
background-image: -webkit-linear-gradient(#00346e, #001c3b);
background-image: -moz-linear-gradient(#00346e, #001c3b);
background-image: -o-linear-gradient(#00346e, #001c3b);
background-image: -ms-linear-gradient(#00346e, #001c3b);
background-image: linear-gradient(#00346e, #001c3b);
}
$header-color: rgb(0,52,110);
div.header-chrome {
@include background-image(linear-gradient(color-stops($header-color, darken($header-color, 10))));
}
div.header-chrome {
-moz-box-shadow: 0px 0px 5px #333333;
-webkit-box-shadow: 0px 0px 5px #333333;
-o-box-shadow: 0px 0px 5px #333333;
box-shadow: 0px 0px 5px #333333;
}
div.header-chrome {
@include single-box-shadow;
}
div.header-chrome {
*zoom: 1;
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#FF00346E', endColorstr='#FF001C3B')";
filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#FF00346E', endColorstr='#FF001C3B');
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #00346e), color-stop(100%, #001c3b));
background-image: -webkit-linear-gradient(#00346e, #001c3b);
background-image: -moz-linear-gradient(#00346e, #001c3b);
background-image: -o-linear-gradient(#00346e, #001c3b);
background-image: -ms-linear-gradient(#00346e, #001c3b);
background-image: linear-gradient(#00346e, #001c3b);
height: 50px;
-moz-box-shadow: 0px 0px 5px #333333;
-webkit-box-shadow: 0px 0px 5px #333333;
-o-box-shadow: 0px 0px 5px #333333;
box-shadow: 0px 0px 5px #333333;
}
$header-color: rgb(0,52,110);
div.header-chrome {
@include pie;
@include filter-gradient($header-color, darken($header-color, 10)); // IE!
@include background-image(linear-gradient(color-stops($header-color, darken($header-color, 10))));
height: $header-height;
@include single-box-shadow;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment