View Categories

The Override Prescription: What It Is and When You Get One

1 min read

An override prescription is a CSS rule generated by Lens that, when added to your site, will beat the rule currently winning on the property you’re trying to change. It appears in Fight View and in full detail on the Triage Page. You copy it and paste it in. The problem should be gone.

Lens only generates a prescription when it’s confident the rule is correct and safe. If the situation is one where a CSS rule can’t reliably fix the problem (JavaScript-set inline styles, for example), this section is hidden and the developer handoff section appears instead.

The variants #

The Triage Page may show up to 3 tabs in the override prescription section:

Base #

The standard override. Lens selects the minimum specificity needed to beat the winning rule without going nuclear with !important if it can avoid it. Use this if the selector targets only one element, or if you want the change to apply everywhere that selector matches across the site.

This page only #

A version scoped to the current page using a body class prefix, so the override only fires on this specific page. Lens shows this tab when the base selector matches more than one element on the site, meaning the base override would change things in places you didn’t intend. If you see a note saying the selector matches multiple elements, start with this variant.

Update the variable #

Shown when the winning value is set via a CSS Variable. Instead of overriding the property directly, this variant updates the variable at the point where it’s defined. Use this when you want the change to apply everywhere that variable is used across the site, not just on this element.

Where to paste it #

In WordPress: Appearance > Customize > Additional CSS. In Elementor or most other page builders: the custom CSS field on the specific widget, section, or page. In a code snippet plugin: a new CSS snippet.

After pasting, save and do a hard refresh (Ctrl+Shift+R on Windows, Cmd+Shift+R on Mac) to bypass any Browser Cache. If you have a Caching Plugin, clear it too before checking whether the fix took effect.

When there’s no prescription #

If Lens shows a cannot-override message instead of a CSS rule, it means the winning rule is set in a way that a CSS addition can’t reliably beat. The most common reason is a JavaScript-set Inline Style. The developer handoff section will be shown instead, with a pre-written message explaining the situation and the capture file your developer needs to find and fix the source.