Customize how offers look in your theme

You can change the spacing, alignment, image size and colors of the Sol: Upsell blocks right in the theme editor, and fine-tune the look with a few lines of CSS in your theme. This article lists every block setting and gives copy-paste CSS examples.

The app has no field for custom CSS, HTML or JavaScript. You style the offers with your theme's own CSS and with the block settings below.

Before you start

Change the block settings

  1. In your Shopify admin, go to Online Store > Themes and select Customize on your theme.
  2. Open a product page (or the Cart page for the cart block).
  3. In the left panel, select the Sol: Upsell block (or Cart offers).
  4. Change the settings from the table below.
  5. Select Save.

You see the change right away in the theme editor preview.

Block settings

Name What it does
Space above Space above the offer, from 0 to 80 px in steps of 2. Default 18 px (12 px on the Cart offers block).
Space below Space below the offer, from 0 to 80 px in steps of 2. Default 18 px (12 px on the Cart offers block).
Text alignment Same as theme (default), Start (left in left-to-right languages), Center or End (right in left-to-right languages). Start and End follow the page direction, so they flip on right-to-left languages.
Hide heading Hides the offer heading from view. Screen readers still read it. Off by default.
Max columns (grid and bundle) From 2 to 6. Default 6 means as many columns as fit. Product page block only.
Image size (list and add-on) Small (48 px), Medium (64 px, default) or Large (96 px).
Button Fill of the main button, the progress bar and reached cart goal milestones. Also colors button borders, the border of the selected volume tier, checkboxes and radio buttons, and the button text in the outline button style.
Button text Text color on the main button and the icon of reached milestones.
Badge Border and text color of the discount badge.
Sale price Color of the offer's current price: the discounted price when there is a discount, otherwise the regular price.

[!INFO] Leave a color empty to inherit it. The button then copies your theme's own Add to cart colors, or the color you set in Settings > Design. The color pickers ignore transparency.

On the Cart offers block, the alignment and the four colors also apply to the cart goal progress bar. Spacing, image size and columns do not.

A setting you leave at its default changes nothing, so CSS you added to your theme keeps working. A setting you change is applied directly on that block and wins over theme CSS.

Change the look with CSS

Paste CSS into Theme settings > Custom CSS in the theme editor, or into your theme's stylesheet. The Custom CSS box of a single theme section only affects that section, so it does not reach the cart drawer or popups.

Use the app's variables for colors, spacing and corners, and the sol-upsell__ classes for individual parts. When a rule targets a part, start it with body .sol-upsell. A single sol-upsell__ class is weaker than the app's own styles. The full list is in CSS variables, classes and events.

Square cards, buttons and panels, and a brand-colored button

:root {
  --sol-upsell-radius: 0;
  --sol-upsell-btn-bg: #0a5c36;
  --sol-upsell-btn-fg: #ffffff;
}

Tighter spacing on the product page only

.sol-upsell[data-placement="pdp"] {
  --sol-upsell-gap: 8px;
  --sol-upsell-mt: 8px;
}

Red prices and badge, and a larger heading

.sol-upsell {
  --sol-upsell-sale: #b3261e;
  --sol-upsell-badge-bg: #b3261e;
}
body .sol-upsell .sol-upsell__h { font-size: 1.25em; text-transform: uppercase; }

When it works, you see the change after you save the theme and reload the page.

[!WARNING] If you changed a color or spacing in the block settings, that value wins over your CSS for that block. Reset the setting (clear the color, or set the default spacing) to let your CSS apply.

What you cannot do

Related articles

← How to use live values in offer text CSS variables, classes and events →