Advertisement
linccce

Stroke

Sep 23rd, 2015
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.41 KB | None | 0 0
  1. @mixin stroke($width, $color) {
  2.   $width: $width + 0;
  3.   $shadow: 0 0 0 transparent;
  4.   $i: 0;
  5.   $w: 1;
  6.  
  7.   @while ($i < $width) {
  8.     $i: $i + 1;
  9.     $j: 0;
  10.     $w: $w + 2;
  11.  
  12.     @for $r from 1 through $w {
  13.       @for $c from 1 through $w {
  14.         $x: $c - ceil($w / 2);
  15.         $y: $r - ceil($w / 2);
  16.  
  17.         $shadow: #{$shadow}, #{$x}px #{$y}px 0 $color;
  18.       }
  19.     }
  20.   }
  21.  
  22.   text-shadow: $shadow;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement