Measure an element (tokenless inspector)
measure_elementInspect any web element's live computed styles, layout metrics, and WCAG color-contrast verdict to verify design-system and accessibility specifications without using screenshots.
Instructions
Zero-image element inspector: one element's live rendering spec from getComputedStyle and getBoundingClientRect — dimensions, position, typography, computed padding and margin, and ancestor-composited foreground/background colors with a WCAG AA (4.5:1) / AAA (7:1) contrast verdict including the large-text relaxation. Verifies design-system and a11y specs without image tokens.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Absolute URL to open, e.g. http://localhost:5173. | |
| reload | No | Reload even if the URL is already open (default reuses it, so it can be stale after an edit). | |
| selector | Yes | CSS selector for the target; first match wins. Playwright prefixes work too (text="Log in", role=button[name="Submit"]). Use "body" to scroll the page itself. | |
| viewport | No | Switch to this breakpoint first. Default: keep the current one. | |
| requireContrast | No | CI gate: FAIL when text/background contrast misses this WCAG level (AA 4.5:1, AAA 7:1, large-text relaxation applies). Unverifiable gradients fail closed. |