Skip to content

Instantly share code, notes, and snippets.

@mallendeo
Last active February 5, 2016 18:56
Show Gist options
  • Save mallendeo/6275778 to your computer and use it in GitHub Desktop.
Save mallendeo/6275778 to your computer and use it in GitHub Desktop.
SCSS mixin for make long shadows easier
@function makelongshadow($color) {
$val: ();
@for $i from 1 through 100 {
$val: append($val, append(#{$i}px #{($i)}px 0, darken($color, 15%)), comma);
/* Uncomment the following two lines for expanded shadow */
/* $val: append($val, append(#{$i}px #{($i * 2)}px 0, darken($color, 15%)), comma);
$val: append($val, append(#{$i * 2}px #{$i}px 0, darken($color, 15%)), comma); */
}
@return $val;
}
@mixin long-shadow($color) {
text-shadow: makelongshadow($color);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment