New & Improved: Star rating widget with SASS

I came across this interesting write up on a star rating system with SASS.

I happened to be creating something with a star rating system myself, so I decided to incorporate this. Unfortunately, I found it to be a bit clunky, requiring classes to be set in two places - once on the <ul> and once on the <li> - in the case of a half star.

While this was possible to do in an AngularJs directive or an EmberJs Component, the code for it proved to be a little unwieldy for my liking. I wanted to simply set one class, on the <ul>, and not have to do anything else.

So I came up with some improvements of my own. And in gist form.

SASS star rating widget improved

EDIT: Just noticed that my comment has been marked as spam - please fix!

my comment marked as spam - oh noes

Copyright © 2008-present Brendan Graetz