DEV Community

Discussion on: Star-rating using Unicode stars

Collapse
 
devanks profile image
Devan Sambasivan

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.

Collapse
 
link2twenty profile image
Andrew Bone

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.

Collapse
 
cormacmaherie profile image
Cormac Maher

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