Created
April 13, 2015 15:54
-
-
Save jensgro/326b8c654c96c905ec49 to your computer and use it in GitHub Desktop.
Linear Gradient with Compass (including IE8)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.12) | |
// Compass (v1.0.3) | |
// ---- | |
@import "compass"; | |
$experimental-support-for-svg: true; | |
.test { | |
@include background(linear-gradient(top, #fd8700, #a20000)); | |
@include filter-gradient(#fd8700, #a20000, vertical); | |
} | |
.test2 { | |
@include background(linear-gradient(to bottom, #a20000, #000)); | |
@include filter-gradient(#a20000, #000, vertical); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.test { | |
background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZkODcwMCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2EyMDAwMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); | |
background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fd8700), color-stop(100%, #a20000)); | |
background: -moz-linear-gradient(top, #fd8700, #a20000); | |
background: -webkit-linear-gradient(top, #fd8700, #a20000); | |
background: linear-gradient(to bottom, #fd8700, #a20000); | |
*zoom: 1; | |
filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#FFFD8700', endColorstr='#FFA20000'); | |
} | |
.test2 { | |
background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2EyMDAwMCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); | |
background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #a20000), color-stop(100%, #000000)); | |
background: -moz-linear-gradient(top, #a20000, #000000); | |
background: -webkit-linear-gradient(top, #a20000, #000000); | |
background: linear-gradient(to bottom, #a20000, #000000); | |
*zoom: 1; | |
filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#FFA20000', endColorstr='#FF000000'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment