Inspector value suggestions

Overview

The type switch changes how a value is written and the unit cycle rewrites the same value in another unit — but neither answers the question that actually stalls an edit: what should this value be? The edit sheet therefore lists the values and design tokens this page already uses for the property being edited, each with the evidence behind it: how many times it appears and which rule supplies it. On top of that list it adds two pieces of guidance the evidence alone cannot give: the value being typed is placed on the page's own numeric scale (with the nearest value and its distance named), and every colour candidate carries its WCAG contrast ratio against the element it would be applied to.

The snap hint and the step note in the edit sheet, above the values this page uses for the property, at 360 px

Usage

Open the edit sheet (tap a declared row or a quick-add chip). Below the value-type switch, for a property the page declares:

Value type — Length        [ Length 16px ][ Percent 100% ][ Number 16 ][ Keyword inherit ]
On this page · 3 values · steps of 4px
  [ 16px 3× ]  [ 12px 1× ]  [ 8px 1× ]
Tokens · from this page
  [ --space-4 = 16px ]  [ --space-3 = 12px ]
Stepping by 4px — this page's own scale · nearest 16px
4 values on this page · steps of 4px
  1. On this page — the values declared for this property anywhere in the page's stylesheets, most-used first. Each chip carries its count (3×) and, on its tooltip, the rule that supplies it (used 3 times (.card)) and its origin (inherited from form.compare). The header counts every value the page declares, not just the chips that fit: a property with thirty padding values reads 34 values seen where the row shows six, because "this property has a scale" and "here are the six most-used values" are different claims.

  2. The value in force — the one the element already resolves to is highlighted, not sorted away: picking it back is a legitimate way to undo a pending edit.

  3. Match a sibling — what the element's peers use for this property, one chip per distinct value, labelled with the element it comes from:

Match a sibling · what the peers use
[ 16px 2nd section.input-section ]  [ 8px 4th section.toolbar ]

The page's stylesheet values are anonymous; a peer is a referent the user can go and look at ("the 2nd section.input-section uses 16px"), which is where a spacing decision usually starts. The value already in the field is not offered back.

  1. Tokens — custom properties (--*) whose value is valid for this property, shown as --space-4 = 16px. Picking one inserts the token name, so the declaration points at the design system rather than copying its value.

  2. The step — when the page's values for the property share a numeric scale, the group header states it (steps of 4px) and the note under the chips repeats the evidence: 4 values on this page · steps of 4px. The − / + steppers on the value field move by that step instead of by 1, and the line under them says so: Stepping by 4px — this page's own scale.

  3. The snap hint — a value that is not one of the page's own values is marked with the value struck through, the nearest page value and how far off it is, and a Snap to 16px button:

13px  nearest 16px · 3px away    [ Snap to 16px ]

An on-scale value says so quietly (on scale · 4 px step) and offers no button.

  1. Colour contrast — for a colour property the chip row becomes the page's palette, each swatch carrying its ratio against the element's resolved background: #9cc2ff AA 8.7:1, #2b3a56 fail 2.4:1. A chip that fails takes the danger styling, so a legibility mistake is visible before Apply rather than after. When the page offers fewer than three colours for the element, a Readable on this element group adds the higher-contrast of white and black.

  2. Keywords for a string value. A value with no per-kind view (font-family, content, a font stack) gets one more group — the property's own keywords and the CSS-wide four, which are otherwise unreachable for it:

Keywords · valid for any property   [ inherit ] [ initial ] [ unset ] [ revert ]

The word already in the field is not offered back, and an enum-shaped property (cursor, display) does not get the group: it renders its own chips, and the same list twice is worse than once.

  1. Tapping a chip only rewrites the field. Apply still commits, so a suggestion, a snap, a sibling value, a keyword and a palette pick are exactly as reversible as anything typed — one property, one undo entry.

    The colour palette with a WCAG contrast badge per swatch at 360 px

Behaviour