.agents/skills/qa-test-planner/references/figma_validation.md
Guide for validating UI implementation against Figma designs using Figma MCP.
Required:
Setup:
# Install Figma MCP (follow official docs)
# Configure API token
# Verify access to design files
Using Figma MCP:
"Get the specifications for the primary button from Figma file at [URL]"
Response includes:
- Dimensions (width, height)
- Colors (background, text, border)
- Typography (font, size, weight)
- Spacing (padding, margin)
- Border radius
- States (default, hover, active, disabled)
Browser DevTools:
Create test case or bug:
TC-UI-001: Primary Button Visual Validation
Design (Figma):
- Size: 120x40px
- Background: #0066FF
- Border-radius: 8px
- Font: 16px Medium #FFFFFF
Implementation:
- Size: 120x40px ✓
- Background: #0052CC ✗ (wrong shade)
- Border-radius: 8px ✓
- Font: 16px Regular #FFFFFF ✗ (wrong weight)
Status: FAIL
Bugs: BUG-234, BUG-235
Example Query:
"Extract spacing values for the card component from Figma"
Example Query:
"Get typography specifications for all heading levels from Figma design system"
Example Query:
"List all color tokens used in the navigation component"
Example Query:
"Compare the implemented dropdown menu with Figma design at [URL]"
## TC-UI-XXX: [Component] Visual Validation
**Figma Design:** [URL to specific component]
### Desktop (1920x1080)
**Layout:**
- [ ] Width: XXXpx
- [ ] Height: XXXpx
- [ ] Padding: XXpx XXpx XXpx XXpx
- [ ] Margin: XXpx
**Typography:**
- [ ] Font: [Family] [Weight]
- [ ] Size: XXpx
- [ ] Line-height: XXpx
- [ ] Color: #XXXXXX
**Colors:**
- [ ] Background: #XXXXXX
- [ ] Border: Xpx solid #XXXXXX
- [ ] Shadow: XXpx XXpx XXpx rgba(X,X,X,X)
**Interactive States:**
- [ ] Hover: [changes]
- [ ] Active: [changes]
- [ ] Focus: [changes]
- [ ] Disabled: [changes]
### Tablet (768px)
- [ ] [Responsive changes]
### Mobile (375px)
- [ ] [Responsive changes]
### Status
- [ ] PASS - All match
- [ ] FAIL - Discrepancies found
- [ ] BLOCKED - Design incomplete
"Get complete specifications for the [component name] from Figma at [URL]"
"Extract all button variants from the design system"
"List typography styles defined in Figma"
"Show me all color tokens in the Figma design system"
"What colors are used in the navigation bar design?"
"Get the exact hex values for primary, secondary, and accent colors"
"What are the padding values for the card component?"
"Extract grid specifications from the page layout"
"Get spacing tokens (8px, 16px, 24px, etc.)"
"What are the defined breakpoints in this Figma design?"
"Show mobile vs desktop layout differences for [component]"
# BUG-XXX: [Component] doesn't match Figma design
**Severity:** Medium (UI)
**Type:** Visual
## Design vs Implementation
**Figma Design:** [URL]
**Expected (from Figma):**
- Button background: #0066FF
- Font weight: 600 (Semi-bold)
- Padding: 12px 24px
**Actual (in implementation):**
- Button background: #0052CC ❌
- Font weight: 400 (Regular) ❌
- Padding: 12px 24px ✓
## Screenshots
- Figma design: [attach]
- Current implementation: [attach]
- Side-by-side comparison: [attach]
## Impact
Users see inconsistent branding. Button appears less prominent than designed.
DO:
DON'T:
Per component:
| Element | What to Check | Tool |
|---|---|---|
| Colors | Hex values exact | Browser color picker |
| Spacing | Padding/margin px | DevTools computed styles |
| Typography | Font, size, weight | DevTools font panel |
| Layout | Width, height, position | DevTools box model |
| States | Hover, active, focus | Manual interaction |
| Responsive | Breakpoint behavior | DevTools device mode |
Remember: Pixel-perfect implementation builds user trust and brand consistency.