Change the Color Of "On Sale" In Focal Theme On Desktop AND Mobile View

Hello Dear community,

Its my third time asking but no one was able to make it work on mobile view. Im using the focal theme and I want to change the color and background color of the “on sale” accent on both desktop AND mobile view.

What exactly do I need to change in the code?

LeyDE_0-1697028813626.png

URL: https://leyah.de/products/5-in-1-haarstyler

Thanks.

Hi @LeyDE

This is Henry from PageFly - Landing Page Builder App

You can try this code by following these steps:

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search file theme.css

Step 3: Paste the below code at bottom of the file → Save

.product-meta__price-list-container span.label.label–highlight {

background: black !important;

color: red !important;

}

Hope that my solution works for you.

Best regards,

Henry | PageFly

Thanks for the fast reply Henry.

This did not work. It only shows on desktop view but I want it mainly on mobile view.

1 Like

You can try again with this code only on mobile:

@media (max-width: 767px){

.product-meta__price-list-container span.label.label–highlight {

background: black !important;

color: red !important;

}

}

This didn’t work either.

1 Like

Hello @LeyDE :waving_hand:

Inside Shopify Admin, you can go to Edit theme code, open file theme.css and add this code at the bottom

.label--highlight {
    color: #000 !important;
    background: #00ff00 !important;
}

The result on mobile

Hope that help!

Unfortunately, this didn’t work for mobile view. It only changed the desktop view.

Are you testing on a physical mobile device or inside your browser’s developer tools? The old version of the sale tag might be cached. Try clearing the cache and test on another mobile device and browser.

I deleted cache and tried another browser. No results.

Okay, in that case I’d have to take a look at your theme code :eyes:

Please try another solution:

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search file theme.liquid

Step 3: paste bellow code in tag → save.

@media (max-width: 767px){ .product-meta__price-list-container span.label.label--highlight { background: black !important; color: red !important; } }

This worked, thanks!

1 Like

You are welcome @LeyDE :blush: