RulerGrid
All guides

Design guide · RulerGrid

Use a screen ruler to check UI spacing

Use the digital ruler to inspect spacing, component widths and alignment in a browser layout.

Quick answer

What is the practical answer?

Use a screen ruler to audit visual spacing, not to replace the CSS inspector. Select pixels, keep the same browser zoom and edge direction, then compare card insets, button heights, icon gaps and column widths. The ruler shows the rendered result at one viewport; confirm the computed CSS value and repeat the check at mobile, tablet and desktop breakpoints before changing the design.

Step-by-step

How to use this guide

  1. 1Switch to px and choose one ruler edge that matches the direction being audited.
  2. 2Use Guides for alignment lines, Measure for one gap and Box for a component’s width and height.
  3. 3Record the rendered value and compare it with the computed style in developer tools.
  4. 4Repeat at 375, 768 and 1440 CSS pixels to catch breakpoint-specific drift.

Design guide

Measure the relationship, not only one gap

A screen ruler can quickly compare a card inset, button height, icon gap and content column. First select pixels, then use the same edge and zoom level for all comparisons. Record the CSS value from developer tools when implementation accuracy matters.

Design guide

Keep visual and CSS measurements separate

A ruler overlay measures what is displayed. Browser zoom, device-pixel ratio and responsive breakpoints can change the visual result without changing the source CSS. Use it for a visual audit, then confirm the computed style in the browser inspector.

Design guide

Check mobile breakpoints

Repeat the comparison at 375, 768 and 1440 CSS pixels. Look for clipped controls, inconsistent gutters, overlapping fixed headers and touch targets below 44 pixels. The same method helps validate forms, result cards and navigation.

Check the result

What to verify before relying on it

A useful spacing audit checks relationships: the same gutter across cards, consistent control heights, readable text width and touch targets large enough for the device. A visual result can change with browser zoom or responsive layout, so keep the screenshot, viewport and computed CSS value together when reporting an issue.

Worked example

A practical design guide example

Example: a card appears aligned at 1440 px but its mobile version has a different left inset. Use the screen ruler in px at 375, 768 and 1440, record the rendered gap, and then inspect the corresponding CSS rule. If the value is intentionally different at a breakpoint, document the rule. If it is accidental, fix the shared token instead of adding a one-off margin. Also check focus rings and touch targets, because a visually aligned component can still be difficult to use.

For a design audit, compare the same component at 375, 768 and 1440 CSS pixels. Keep the screenshot, viewport and computed value together so a layout difference is distinguishable from browser scaling.

Search intent

When this measurement workflow is useful

Use this workflow when you need to review a responsive interface at more than one viewport width. It is most helpful for a first estimate, a design review, a classroom explanation, a home project or a repeatable browser check where the input and output can be seen together. Start with the answer and steps on this page, then keep the limitations visible while working. The result should be easy to explain: state the unit, the reference, the display or printer context, the setting that was used and the check that was performed. If another person cannot reproduce the result from those details, the measurement is not yet well documented. When a result affects a purchase, prescription, construction tolerance, safety requirement or regulated document, move to the appropriate physical instrument or professional workflow. RulerGrid helps expose the relationship between values; it does not inspect the material, certify the device or remove uncertainty from an unknown reference.

Troubleshooting

Common errors to avoid

  • Measuring at one viewport and assuming every breakpoint matches.
  • Using a physical unit for a CSS layout decision.
  • Ignoring the fixed header or scrollbar when judging alignment.
  • Replacing a measured value without checking focus, hover and touch states.

Official references

Sources and measurement standards

Use these references to understand the units and standards behind the workflow. RulerGrid uses them as context; the visible tool result still depends on the current browser, display or printer.

FAQ

Questions about design guide

Is an online ruler accurate?

It can be accurate for a calibrated screen, but browser zoom, display scaling, device changes and the reference object affect the result. Verify a second length with a physical ruler before relying on it.

How do I calibrate the ruler?

Set browser zoom to 100%, open Calibrate, then use a card, A4, US Letter, screen diagonal, known PPI or custom length. The card and custom reference methods are usually the most practical.

What should I do when I move the page to another screen?

Recalibrate. RulerGrid stores the viewport and display context and marks the status when browser zoom or device-pixel ratio changes.

Can I use the ruler on an iPhone or Android phone?

Yes. Keep the browser at 100%, use a stable flat surface, calibrate with a known reference and use one-finger touch gestures. It is intended for quick estimates, not medical or safety-critical measurement.

Should I use pixels or millimeters for UI spacing?

Use pixels for CSS layout and component geometry. Use millimeters only when the interface is being compared with a physical object or a print specification.

Why does the same gap look different on mobile?

Responsive breakpoints, device-pixel ratio, browser zoom and font rendering can change the rendered relationship. Check the CSS value and the target viewport separately.

Use the answer now

Open the interactive measurement tool

Start with the related tool, confirm the unit, keep the verification step visible and use the result as an estimate when the task needs physical confirmation.

Open calibrated ruler