Skip to content

Instantly share code, notes, and snippets.

@jfromaniello
Created July 6, 2012 20:45
Show Gist options
  • Save jfromaniello/3062653 to your computer and use it in GitHub Desktop.
Save jfromaniello/3062653 to your computer and use it in GitHub Desktop.
for rate in 1..5
.rate-{rate}
span:nth-child(-n+{rate})::after
content: "★"
span:nth-child(n+{rate+1})::after
content: "☆"
.rate-1 span:nth-child(-n+1):after {
content: "★";
}
.rate-1 span:nth-child(n+2):after {
content: "☆";
}
.rate-2 span:nth-child(-n+2):after {
content: "★";
}
.rate-2 span:nth-child(n+3):after {
content: "☆";
}
.rate-3 span:nth-child(-n+3):after {
content: "★";
}
.rate-3 span:nth-child(n+4):after {
content: "☆";
}
.rate-4 span:nth-child(-n+4):after {
content: "★";
}
.rate-4 span:nth-child(n+5):after {
content: "☆";
}
.rate-5 span:nth-child(-n+5):after {
content: "★";
}
.rate-5 span:nth-child(n+6):after {
content: "☆";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment