I like the unicode usage. But making it support half stars like how @madsstoumann does in their implementation would be hard right? I can think of having maybe two stars in one place and hiding one of them vertically based on fraction.
Yeah, half star will be difficult. I think you're right that you'd hide half of a star but doing this will double the amount of HTML required too.
Use ten stars, then use clip-path and nth-child(odd) for to position them, that should work fairly well, but yes, it would be extra HTML
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I like the unicode usage. But making it support half stars like how @madsstoumann does in their implementation would be hard right?
I can think of having maybe two stars in one place and hiding one of them vertically based on fraction.
Yeah, half star will be difficult. I think you're right that you'd hide half of a star but doing this will double the amount of HTML required too.
Use ten stars, then use clip-path and nth-child(odd) for to position them, that should work fairly well, but yes, it would be extra HTML