Skip to content
IvaSure add-ons and services for SureCart storesJoin the POD waitlist

Design tokens, theming and Custom CSS

4 min read
Published

IvaSure has no template files to override. Everything a merchant would normally fork is exposed as a CSS custom property instead, and the settings screen writes to the same properties - so the fast route and the precise route lead to the same place.

Two colours

On IvaSure → Filters → Design → Theme, the whole palette derives from a primary and an accent.

The Theme section of the IvaSure Filters admin, opened. Under a Start from a preset select, a Brand group holds Primary Brand and Accent colour pickers with hex fields reading #14b8a6 and #0f172a, and a row of derived swatches under the primary. Below it Typography and Scale has a Base Size slider set to 13px and a Scale Ratio select reading Major Third 1.25.
The Theme section of the Design tab.
  1. Primary is selection, focus and highlights - the colour a shopper sees when something is chosen.
  2. Accent is text emphasis and secondary detail.

The four small swatches under the Primary picker are not decoration: the first is the colour itself, and the other three are the light, dark and tint steps IvaSure derives from it and then uses throughout the filter. You set one colour and get a coherent set. Accent has no derived steps, so its single swatch is only a preview of the colour you chose.

The dark step is measured, not guessed
One of the derived steps is chosen so it clears WCAG AA rather than by subtracting a fixed amount of lightness. It is what small brand-coloured text uses - Show more, Expand all, the rating stars - so a pale brand colour is darkened enough to read and a brand that is already dark is left alone.

Type scale

A base size and a ratio generate the whole scale, from the smallest status text to the section headings. The ratio is the step between sizes: Minor Third is restrained, Perfect Fourth is dramatic.

The scale has a floor
Down-steps compound. A 14px base at 1.25 puts the smallest size at 8.96px before the fluid clamp takes it lower still, which is what the filter status text used to render at. Sizes are held at 12px minimum, so your ratio still shapes the scale but cannot compound its way down to unreadable.

Surface

SurfaceWhat it drawsUse when
IvaSure cardA panel with its own background, border and radius.The filter needs to read as a distinct object.
TransparentNo panel at all - just the controls.It already sits inside a card your theme drew.
Inherit themeColours taken from the surrounding theme rather than IvaSure’s own.A dark theme, or a heavily branded storefront.

Custom CSS

For anything the settings do not cover, Design → Advanced has a Custom CSS field. It is injected on the front end after the plugin stylesheet, and applied live to the design preview as you type.

The Custom CSS block in the IvaSure admin: an empty Additional Styles textarea, then two grouped lists of variable names - a Colour group with ff-primary, ff-primary-ink, ff-text-main, ff-text-muted, ff-border and ff-surface, and a Spacing and size group with ff-filter-card-padding, ff-filter-section-gap, ff-filter-row-height and ff-filter-swatch-size.
The Custom CSS field, with the token names it accepts.

Set variables rather than overriding rules. A variable is honoured by every rule that reads it, survives an update, and needs no specificity fight.

Roomier rows, bigger swatches, more padding
.ivasure-wrap {
  --ff-filter-row-height: 34px;
  --ff-filter-swatch-size: 26px;
  --ff-filter-card-padding: 20px;
}

The variables

These names are a stable contract. They are not renamed between versions, because merchant CSS references them.

ColourWhat it paints
--ff-primaryThe brand colour as a fill: tints, borders, the selected state.
--ff-primary-inkThe brand colour as text or as a glyph, at the contrast-safe step.
--ff-text-mainOption labels and headings.
--ff-text-mutedCounts and secondary text.
--ff-borderHairlines and control outlines.
--ff-surfaceThe panel background.
Spacing and sizeWhat it moves
--ff-filter-card-paddingInside the panel.
--ff-filter-section-gapBetween sections.
--ff-filter-row-gapBetween option rows.
--ff-filter-row-heightThe height of one option row - and therefore its touch target.
--ff-filter-swatch-sizeSwatch diameter.
--ff-filter-card-radiusPanel corner radius.
--ff-filter-sidebar-minThe narrowest the sidebar layout will go before it stacks.
--ff-filter-sticky-topOffset for a sticky filter, if your theme has a fixed header.
--ff-filter-motionTransition duration. Set it to 0s to remove animation.
Row height is a touch target
Taking --ff-filter-row-height below 24px puts the option rows under the WCAG 2.2 minimum target size. There is a reason the mobile breakpoint raises it to 42px rather than lowering it.

Recipes

Match a dark theme. Set the surface to Inherit theme first - it takes the panel background and text colour from your theme rather than IvaSure’s. Reach for Custom CSS only if individual pieces still need moving.

.ivasure-wrap {
  --ff-border: rgba(255, 255, 255, 0.14);
}

Clear a sticky header. A filter that sticks while the grid scrolls slides under a fixed header unless it is told how tall that header is.

.ivasure-wrap {
  --ff-filter-sticky-top: 88px;
}

Turn off animation. Motion already respects prefers-reduced-motion. To remove it for everyone:

.ivasure-wrap {
  --ff-filter-motion: 0s;
}

Style one placement only. Every filter carries classes describing how it was configured, so a single placement can be targeted without touching the rest.

.ivasure-wrap--compact {
  --ff-filter-card-padding: 10px;
}

What theming does not cover

  • There are no template overrides. Markup is not a public contract; the variables and the class names are.
  • Do not restyle by fighting specificity. A rule that wins today by being longer loses the next time the plugin’s own selector grows. Set a variable instead.
  • Check contrast after changing a colour. The derived dark step keeps brand-coloured text legible, but a hand-written override in Custom CSS is entirely yours to verify.

Save to list