Skip to content

Instantly share code, notes, and snippets.

@treetop1500
Last active September 22, 2016 15:49
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 treetop1500/39577ef556de22a9acfe934cbc108a4e to your computer and use it in GitHub Desktop.
Save treetop1500/39577ef556de22a9acfe934cbc108a4e to your computer and use it in GitHub Desktop.
For generating classes with alpha using rgb
@mixin alphaColor ($name,$color) {
@for $i from 1 through 10 {
.c-#{$name}-#{$i} {
color: rgba($color,$i/10);
}
}
}
@include alphaColor("blue",blue);
@include alphaColor("red",#ed1414);
@include alphaColor("absurd",rgb(20,237,20));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment