Hi guys,
i want to change the color on the star rating in the product grid but i really cant fint out where to do it.
Could you share your page URL to check?
Have send you a privat massage ![]()
You can change it from Online store > Themes > Customize > Collections > Default collection > Product grid > Color scheme, click Edit > change color in Text. But it will change the color of the product title.
If you want to change color of star only then you can add this CSS code below in Custom CSS of Product grid, change #3b61ef in code with your color code
.rating-star:before {
content: "\2605\2605\2605\2605\2605";
background: linear-gradient(90deg,#3b61ef var(--percent),rgba(var(--color-foreground),.15) var(--percent));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
Thanks alot that work!
You are very welcome
Hello - thank you so much, itâs exactly what I need. Although it works in the design view (I see the stars change colour), when I try and save, I get a red message at the bottom saying âOnline store publisher session canât be publishedâ. Do you know why this might be?
Thank you!!!
So please add code to theme.liquid file, after and check again
{%- if template.name == 'collection' or template.name == 'search' -%}
{%- endif -%}
Thank you so much but that doesnât work; the stars are still the same colour. Iâve tried to rename and upload my theme.liquid file but it wonât let me!
I really do appreciate your help with this, there is no way that Iâd be able to work it out on my own!
did you solve this?
yes i am
Amazing, thanks, it looks like it will work and then shopify wonât let me publish it. Something is wrong. Iâm using âNew Refresh.â
Plesae use this code and add it to your theme.liquid file after tag instead of add code to Custom CSS
{%- if template.name == 'collection' or template.name == 'search' -%}
{%- endif -%}
Didnât work. ![]()
Please share your store link so I can check
Thanks Dan!
Servus Männer,
my worke around⌠put it in your base.css on the bottom ![]()
.rating-star:before {
content: ââ
â
â
â
â
â !important;
background: linear-gradient(
90deg,
#FFD700 calc(var(ârating, 0) * 20% + var(ârating-decimal, 0) * 10%),
rgba(0, 0, 0, 0.15) calc(var(ârating, 0) * 20% + var(ârating-decimal, 0) * 10%)
) !important;
-webkit-background-clip: text !important;
-webkit-text-fill-color: transparent !important;
display: inline-block !important;
font-size: inherit !important;
}
.rating-star::before {
font-size: 1.5rem !important;
}