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
- Add the Sol: Upsell block to your product page and, if you use the cart page, the Cart offers block. See How to add the Upsell block to your product page and How to add the Cart offers block to your cart page.
- Store-wide colors, corners and fonts live in Settings > Design in the app. Block settings override them for that one block only. See How to match offers to your theme.
- The block settings do not apply to the cart drawer and popups. Those follow Settings > Design and your theme CSS.
Change the block settings
- In your Shopify admin, go to Online Store > Themes and select Customize on your theme.
- Open a product page (or the Cart page for the cart block).
- In the left panel, select the Sol: Upsell block (or Cart offers).
- Change the settings from the table below.
- 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
- There is no custom CSS, HTML or JavaScript field in the app, and offers never run code you supply.
- Do not rely on how deep elements sit in the page or on their order. Use the class names and
data-attributes only. - If a layout cannot be reached with the block settings and CSS, contact support. See How to contact support.
Related articles
- How to match offers to your theme
- CSS variables, classes and events
- How to add the Upsell block to your product page
- How to add the Cart offers block to your cart page
← How to use live values in offer text CSS variables, classes and events →