DEV Community

Discussion on: Scalable "star rating" without JS (and no SVG or image for the star)

Collapse
 
afif profile image
Temani Afif

but you cannot repeat a clip-path ;) that's why I am using it as mask. It's one star repeated.

Collapse
 
madsstoumann profile image
Mads Stoumann • Edited

Ah, yes. I thought you had an <i> after each <input>. What about rtl-support? 😁

Thread Thread
 
afif profile image
Temani Afif

The lazy solution would be to use

[dir="rtl"] .stars i {
    background-position: right;
}
Enter fullscreen mode Exit fullscreen mode

Or I can update the code like this: codepen.io/t_afif/pen/eYWJNBd

Thread Thread
 
afif profile image
Temani Afif • Edited

updated the post to include this. I was writing this fast yesterday and forgot to work on it.

Thread Thread
 
madsstoumann profile image
Mads Stoumann

Cool!