Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to have some margin between stars? #23

Open
alinoudev opened this issue Feb 16, 2020 · 3 comments
Open

Is it possible to have some margin between stars? #23

alinoudev opened this issue Feb 16, 2020 · 3 comments

Comments

@alinoudev
Copy link

Is it possible to have some margin between stars?

@FernE97
Copy link

FernE97 commented Jun 18, 2020

Think the best solution for now is to use your own svg image and add the spacing on the actual svg image. The background image repeats and there is no way to add spacing to a repeated background image.

@spacecat
Copy link

svg

I had my own svg image with a bit of white space on the left and right of my star icon but the decimal is off because of the extra margin. So for example when the rating is 3.9, rater-js only paints the 3.7/3.8 and I can clearly see it is not 3.9.
Since like you said it's a repeated background I don't know if there is a good solution for this. Maybe with some recalculation of the %-tage of the background that fills the rater taking into account the extra margin in the svg image.

It would be nice though if in your initialization of rater-js in your javascript could specify something like:

"spaceBetweenStars": "5px"

@fredolss
Copy link
Owner

I think "spaceBetweenStars" is a good idéa. But maybe just adding the extra margin to starSize will work? Did you try this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants