Skip to content

Instantly share code, notes, and snippets.

@yoksel
Created March 10, 2014 15:55
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 yoksel/9467758 to your computer and use it in GitHub Desktop.
Save yoksel/9467758 to your computer and use it in GitHub Desktop.
Function creates border for text. Default 5 steps and color white.
@function shadows($max: 5, $color: white){
$out: null;
@for $i from 0 through $max {
$pos: #{$i}px;
$pos-n: -$pos;
$shadow-t-l: $pos-n $pos-n 0 $color;
$out: append( $out, $shadow-t-l, comma );
$shadow-t-r: $pos $pos-n 0 $color;
$out: append( $out, $shadow-t-r, comma );
$shadow-b-r: $pos $pos 0 $color;
$out: append( $out, $shadow-b-r, comma );
$shadow-b-l: $pos-n $pos 0 $color;
$out: append( $out, $shadow-b-l, comma );
}
$shadow-back: 0 5px 10px rgba(0,0,0,.8);
$out: append( $out, $shadow-back, comma );
@return $out;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment