Sub topic 2
Treating the design as the reference: specs, tokens and redlines
This chapter assumes you know the CSS box model, selectors and units, and can open a Figma frame or a PDF spec. Before you measure the built page, you need to know exactly what the design says. A visual QA pass only works if you compare the page to a clear reference. It does not work if you compare it to your memory of the design.
What counts as the reference
A design file is usually the source of truth, but it comes in several forms. Each form answers a different question.
| Source | What it tells you | Typical risk |
|---|---|---|
| Design frame (Figma, Sketch) | Layout, spacing, sizes, appearance | Rounded or eyeballed values |
| Design tokens | Named values for color, type, spacing | Tokens in the file differ from tokens in code |
| Redlines or specs | Annotated measurements for one screen | Go stale after a design change |
| Style guide | Rules that apply across screens | Does not cover a specific layout |
When sources disagree, ask the designer which one wins. Write the answer down so you do not argue the same point twice.
Design tokens
A design token is a named value that stands for a design decision, such as color-text-muted or space-4. Tokens let you check intent instead of raw numbers. If the page uses #777 where the design uses color-text-muted, you can see whether the page is wrong or the token has changed.
Developers usually expose tokens as CSS custom properties:
:root {
--color-text: #1a1a1a;
--color-text-muted: #595959;
--space-2: 8px;
--space-4: 16px;
--font-size-body: 1rem;
--line-height-body: 1.5;
}Build a short table from the design before you start. List each token with its value, then compare against the page.
Reading a frame
Open the frame in the design tool's inspect mode. For each element you plan to check, record:
- Width, height and position relative to its parent.
- Padding, margin or gap. Auto-layout frames in Figma show these directly.
- Font family, size, weight, line height and letter spacing.
- Fill, border and shadow values.
Note the unit. Design tools measure in pixels, while the built page may use rem or percentages. A 24px design value is 1.5rem when the root font size is 16px.
Redlines
A redline is an annotated drawing that marks distances and sizes. Redlines are quick to read but cover only the states and widths the designer drew. If a redline shows only the desktop view, you have no reference for tablet. Mark those gaps as questions for the designer. Do not guess.
Common errors
- Trusting a stale redline after the design was updated. Check the file's version or date.
- Reading a value from a scaled or zoomed frame.
- Comparing a design value in pixels with a computed value without converting units.
- Treating a placeholder in the design, such as lorem ipsum or a stock photo, as final content.
Exercise
The design says body text uses color-text-muted. The page shows #777777, but the token file defines color-text-muted as #595959. What should you do before logging a bug?
Show answer
Confirm which value is current with the designer or the token source, because either the page or the design file may be out of date. Then log the discrepancy against the confirmed value, citing the token name and both hex values.