Last active
August 29, 2015 14:10
-
-
Save blackfalcon/391365643fdbe5fd9107 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
// ---- | |
// 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%); | |
} |
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
#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