How to style prices with CSS?

Help Wanted Post!! I want to change the price style. The theme I’m using, “Tinker”, doesn’t have this feature. So I want to convert my price style into an image using CSS. Can someone help me with this?(Unlined prices are displayed in red, while lined prices appear in gray with a reduced font size)

需要更改的样式

价格样式

You can add this code to Custom CSS in Theme settings and check

 div[ref="priceContainer"]:has(.compare-at-price) .price { color: red; }
.product-details div[ref="priceContainer"] .compare-at-price { font-size: 1.2rem; }
.collection-wrapper div[ref="priceContainer"] .compare-at-price { font-size: 12px; }


Best regards,
Dan from Ryviu: Reviews & Loyalty App

The problem has been solved, thank you so much!!

You are very welcome!