How to match the widget to your theme

The options widget inherits your theme's fonts and colors by default. This article shows how to keep that, how to choose your own look in Settings > Design, and how to fine-tune it with CSS variables.

Before you start

Match your theme

Match my theme is on by default ("Use your theme's fonts and colors"). On each product page, the widget copies from your theme's variant picker:

If a theme has no variant picker to copy, nothing is copied and the widget uses its defaults.

Settings, Design tab: the Match my theme switch turned on, the list of what comes from your theme, and the Preview of a Ceramic Mug with its options on the right

Choose your own design

  1. Go to Settings > Design.
  2. Turn off Match my theme.
  3. Under Corner style, choose Square, Rounded or Pill. The new look starts on Rounded.
  4. Under Colors, set each color with a hex value like #101010.
  5. Under Text, choose a Font and a Label size (px) from 10 to 24.

Settings, Design tab with Match my theme off: corner style choices, color fields for labels, choices and messages, the Font and Label size fields and the Preview 6. Click Save.

Group Color Default
Labels and prices Label #303030
Add-on price #616161
Choices Option text #303030
Border #8a8a8a
Selected #303030
Messages Error #8e0b21
Font Result
Same as theme Your theme's font (default)
Inter Inter, included with the app. It covers basic Latin and Western European accented letters, common punctuation and the euro sign. Other characters use a fallback font.
Georgia Georgia

Click Reset next to a group to return its colors to the defaults. The default label size is 14.

Fine-tune with CSS variables

If a theme needs more adjusting, add CSS variables to your theme's CSS (for example under Online Store > Themes > Customize > Theme settings > Custom CSS). Set them on .sol-options:

.sol-options {
  --lo-selected: #111111;
  --lo-pill-radius: 0;
}
Variable What it controls
--lo-text, --lo-label Option text and label colors
--lo-label-size, --lo-label-weight Label size and weight
--lo-border Borders of inputs, checkboxes, radios and dividers
--lo-selected The picked state of buttons, checkboxes, radios and switches
--lo-addon Add-on prices
--lo-error Required mark and error messages
--lo-radius, --lo-pill-radius Corners of inputs and swatches, and of buttons
--lo-gap Space between options
--lo-font Font family

Which setting wins

  1. A --lo-* variable you set in your theme's CSS.
  2. Settings > Design, when Match my theme is off.
  3. What the widget copies from your theme, when Match my theme is on.
  4. The built-in defaults.

[!INFO] Set variables on .sol-options itself. A variable set on an inner element has no effect.

Related articles

← App embed and product block: what each one does What customers see on the product page →