demo · v152 · CSS · DOM
Pseudo-Element Explorer
Inspect computed styles, test Element.prototype.pseudo() support, and live-edit pseudo-element properties for ::marker, ::before, ::after, and ::backdrop. The probes distinguish supported CSSPseudoElement handles from pseudos that remain computed-style-only.
Select a pseudo-element type in the toolbar. The inspector panel reads its computed styles via
getComputedStyle(el, '::pseudo-name') and probes whether
Element.prototype.pseudo() is available (Chrome 152+), but each pseudo type still needs its own runtime probe.
The style editor on the right changes the pseudo-element's appearance live.
Live demo elements
- First item (::marker)
- Second item (::marker)
- Third item (::marker)
Text with ::before and ::after decorators
API support probes
Computed styles (::marker)
| Property | Computed Value |
|---|
Live style editor (::marker)
Adjust properties to see the selected pseudo-element update:
color (via CSS custom prop or class)
Generated CSS
--
how it works
// Chrome 152+: get a supported CSSPseudoElement handle
const item = document.querySelector('li');
const marker = item.pseudo('::marker');
// marker is a CSSPseudoElement when this pseudo type is exposed
// Read computed styles on any pseudo (works across browsers)
const styles = getComputedStyle(element, '::marker');
console.log(styles.color, styles.fontSize);
// Feature detect each pseudo, not just the method
const backdrop = dialog.pseudo?.('::backdrop');
// In current Chrome this may return null or throw.
see also
- CSSPseudoElement support — feature index
- ChromeStatus entry
- CSS Pseudo-Elements spec