Skip to content

Instantly share code, notes, and snippets.

@blackfalcon
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blackfalcon/391365643fdbe5fd9107 to your computer and use it in GitHub Desktop.
Save blackfalcon/391365643fdbe5fd9107 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// libsass (v3.0.1)
// ----
@function get-list-value($list, $place: first) {
@if $place == first {
$group: nth($list, 1);
$first-object: nth($group, 1);
@return $first-object
} @else if $place == last {
$group: nth($list, length($list));
$last-object: nth($group, 1);
@return $last-object
} @else {
@return 'this is an invalid option'
}
}
@mixin simple-gradient ($direction, $colors ...) {
$startColorstr: get-list-value($colors);
$endColorstr: get-list-value($colors, last);
background-color: $startColorstr;
background-image: linear-gradient(to #{$direction}, $colors);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#{ie-hex-str($startColorstr)}',
endColorstr = '#{ie-hex-str($endColorstr)}', GradientType = 0);
}
#main {
@include simple-gradient(bottom, #e2e2e2 0%, #ffffff 15%, #f7f7f7 89%, #ffffff 98%);
}
#main {
background-color: #e2e2e2;
background-image: linear-gradient(to bottom, #e2e2e2 0%, #ffffff 15%, #f7f7f7 89%, #ffffff 98%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#FFE2E2E2',
endColorstr = '#FFFFFFFF', GradientType = 0); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment