Skip to content

Instantly share code, notes, and snippets.

@mturjak
Created February 19, 2014 20:57
Show Gist options
  • Select an option

  • Save mturjak/9101372 to your computer and use it in GitHub Desktop.

Select an option

Save mturjak/9101372 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.2.14)
// Compass (v0.12.2)
// ----
@import "compass";
@mixin compositeFill($size: 100px, $gradient: (top, #000000 0%, #FFFFFF 100%)) {
$isTop: nth($gradient, 1) == "top";
$direction: if($isTop, vertical, horizontal);
$widthHeight: if($isTop, height, width);
$heightWidth: if($isTop, width, height);
@include background-image(linear-gradient($gradient...));
}
test {
@include compositeFill();
}
test {
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #000000), color-stop(100%, #ffffff));
background-image: -webkit-linear-gradient(top, #000000 0%, #ffffff 100%);
background-image: -moz-linear-gradient(top, #000000 0%, #ffffff 100%);
background-image: -o-linear-gradient(top, #000000 0%, #ffffff 100%);
background-image: linear-gradient(top, #000000 0%, #ffffff 100%);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment