Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. @function text-stroke-shadow-layer($offset, $color)
  2. $text-shadow: ()
  3. $text-shadow: append($text-shadow, #{$offset}px 0 0 $color, comma)
  4. $text-shadow: append($text-shadow, #{$offset}px #{$offset}px 0 $color, comma)
  5. $text-shadow: append($text-shadow, 0 #{$offset}px 0 $color, comma)
  6. $text-shadow: append($text-shadow, #{-$offset}px #{$offset}px 0 $color, comma)
  7. $text-shadow: append($text-shadow, #{-$offset}px 0 0 $color, comma)
  8. $text-shadow: append($text-shadow, #{-$offset}px #{-$offset}px 0 $color, comma)
  9. $text-shadow: append($text-shadow, 0 #{-$offset}px 0 $color, comma)
  10. $text-shadow: append($text-shadow, #{$offset}px #{-$offset}px 0 $color, comma)
  11.  
  12. @return $text-shadow
  13.  
  14. @function text-stroke-shadow($color, $width)
  15. $width: strip-unit($width)
  16. $floor-width: floor($width)
  17. $text-shadow: ()
  18.  
  19. @for $offset from 1 through $floor-width
  20. $text-shadow: append($text-shadow, text-stroke-shadow-layer($offset, $color), comma)
  21.  
  22. @if $width != $floor-width
  23. $text-shadow: append($text-shadow, text-stroke-shadow-layer($width, $color), comma)
  24.  
  25. @return $text-shadow
  26.  
  27. =text-stroke($color, $width)
  28. text-shadow: text-stroke-shadow($color, $width)
  29.  
  30. @media screen and (-webkit-min-device-pixel-ratio: 0)
  31. -webkit-text-stroke: $width $color
  32. text-shadow: none
  33. @content
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement