check_alignment
Audit a group of elements for alignment: detect misaligned edges, uneven gaps, size inconsistencies, and grid violations. Reports fractional pixel offsets and pixel-snap warnings.
Instructions
Pixel-perfect audit for a GROUP of elements (a selector's matches or a uid list): which edges/centers align and which element is off by how many px, gap rhythm with outliers ('gaps median 24px — e5→e6 is +7.5px'), size consistency, optional N-px grid conformance, and pixel-snap warnings (fractional device pixels render blurry). Reach for it on 'unevenly spaced', 'one card sits lower', 'the nav items look off', 'nothing lines up'. For ONE element's internal glyph centering use measure_element instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uids | No | Explicit uids from a prior snapshot | |
| gridUnit | No | Also check lefts/tops against an N-px grid (e.g. 8) | |
| selector | No | CSS selector — audits ALL matches (2–40), e.g. ".nav li" or ".card" | |
| tolerance | No | Px within which values count as aligned (default 0.5) |