Skip to content

Instantly share code, notes, and snippets.

@yoksel
Created October 5, 2014 15:52
Show Gist options
  • Save yoksel/738082fb67e6a3ec2dd3 to your computer and use it in GitHub Desktop.
Save yoksel/738082fb67e6a3ec2dd3 to your computer and use it in GitHub Desktop.
Mixin for gradient star
@mixin star($rays: 6){
$gradients: null;
$angle: 360/$rays;
@for $item from 1 through $rays/2 {
$gradItem: linear-gradient(#{$angle * $item}deg,
$transp 49.5%,
black 49.5%, black 50.5%,
$transp 50.5%);
$gradients: append($gradients, $gradItem, comma);
}
background: $gradients;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment