Created
June 14, 2012 16:59
-
-
Save raulb/2931487 to your computer and use it in GitHub Desktop.
Linear gradient and background image mixed with SASS
This file contains 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
// Basic example | |
@mixin linear-gradient-image($image-url, $start-color, $stop-color) | |
background: url(#{$image-url}) right 0 no-repeat, $stop-color | |
background: url(#{$image-url}) right 0 no-repeat, -moz-linear-gradient(top, $start-color, $stop-color) | |
background: url(#{$image-url}) right 0 no-repeat, -ms-linear-gradient(top, $start-color, $stop-color) | |
background: url(#{$image-url}) right 0 no-repeat, -o-linear-gradient(top, $start-color, $stop-color) | |
background: url(#{$image-url}) right 0 no-repeat, -webkit-gradient(linear, left top, left bottom, from($start-color), to($stop-color)) | |
background: url(#{$image-url}) right 0 no-repeat, -webkit-linear-gradient(top, $start-color, $stop-color) | |
background: url(#{$image-url}) right 0 no-repeat, linear-gradient(top, $start-color, $stop-color) | |
.foo | |
+linear-gradient-image("/images/base/buttons/right-select.png", #A8E7FE, #53CBF5) |
Author
raulb
commented
Jun 30, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment