Skip to content

Instantly share code, notes, and snippets.

@mikeyjk
Last active January 27, 2016 03:24
Show Gist options
  • Save mikeyjk/ec56402407c43dd37058 to your computer and use it in GitHub Desktop.
Save mikeyjk/ec56402407c43dd37058 to your computer and use it in GitHub Desktop.
Optional parameter test SCSS.
background: #FFFFFF;
background: url("http://placehold.it/350x150") left no-repeat, -webkit-linear-gradient(#FFFFFF, #000000);
background: url("http://placehold.it/350x150") left no-repeat, -o-linear-gradient(#FFFFFF, #000000);
background: url("http://placehold.it/350x150") left no-repeat, -moz-linear-gradient(#FFFFFF, #000000);
background: #FFFFFF;
background: -webkit-linear-gradient(#FFFFFF, #000000);
background: -o-linear-gradient(#FFFFFF, #000000);
background: -moz-linear-gradient(#FFFFFF, #000000);
// ----
// libsass (v3.3.2)
// ----
$gradient: #FFFFFF, #000000;
$bg-img: url("http://placehold.it/350x150") left no-repeat;
@mixin cross-browser-gradient($fallback, $gradient, $image:null) {
background: $fallback;
background: $image, -webkit-linear-gradient($gradient);
background: $image, -o-linear-gradient($gradient);
background: $image, -moz-linear-gradient($gradient);
}
@include cross-browser-gradient(#FFFFFF, $gradient, $bg-img);
@include cross-browser-gradient(#FFFFFF, $gradient);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment