Live CSS preview, and a warning when your change won’t hold
What this is
This release added live preview to the confirming step. When you type a target value, Lens applies it to the clicked element on the page in real time, so you see the change before you commit to a diagnosis. No save. No reload. The element just updates while you type.
It also added a dynamic warning. If the value you typed will be overridden by a higher-specificity rule, Lens says so and names the real source doing the overriding: a theme, a plugin, a page builder, an inline style, or a script. Pseudo-elements got the same treatment, so ::before and ::after now have selectable property cards, live preview, and full triage parity. The property list collapses while you type so the popup stops sitting on top of the element you’re trying to watch.
What it answers
– how do i preview a css change before applying it on my site
– why does my css change not hold even though it looks right
– what is overriding my css when my change keeps getting ignored
– how to see live css changes without editing the stylesheet
– how do i style a before or after pseudo element that won’t change
Why we built it
The diagnosis is more useful when you can watch the change land before you trust it. A value that won’t survive the cascade should say so while you’re still typing it, not after you’ve pasted it.
- Live preview applies a typed CSS value to the clicked element on the page so you see the change before committing it (popup.js, content.js)
- A dynamic warning says whether the change will hold and, when it won't, names the real source overriding it: theme, plugin, page builder, inline style, or script
- Pseudo-element (::before and ::after) diagnosis arrived, with selectable property cards, their own live preview, a pseudo-qualified diagnosis header, and full triage parity
- The property list now collapses while you type, keeping the selected property in view so the popup stops covering the element being previewed
- The prescription card now flags when an override is backed by a CSS variable, so you know the value diverges from the variable's definition
- Live preview now targets the exact element you clicked instead of the first selector match, using a direct element reference set at capture time
- Preview no longer silently fails on elements without a unique DOM id, since the matchCount guard was removed from the popup listener
- Two pseudo-preview helpers (lensPreviewApplyPseudo and lensPreviewClearPseudo) were called but never defined, throwing a silent error on every apply; both were added
- An ambiguous selector that matches more than one element now suppresses the preview and warning instead of previewing the wrong element
- Unmatched pseudo-element properties no longer crowd out authored ones, so real styles like color show up in the pseudo list