Apply all design principles from this module systematically — develop a design review process for evaluating your own implementations, identifying principle violations, and making targeted improvements without redesigning from scratch.
Every design principle covered in this module — CRAP, visual hierarchy, color theory, typography, layout composition, Gestalt, and design psychology — converges in practice on a single question: 'Does this interface work for users?'
A systematic review process applies all these principles in sequence, identifying which are working and which are violated. Knowing which principle is violated tells you exactly what CSS to change — contrast issue is a color fix, proximity issue is a spacing fix, hierarchy issue is a size or weight fix.
This lesson builds a practical 30-minute design review workflow that any developer can use to evaluate their own work before submitting it for design review.
The review workflow has five phases. Completing all five takes 20-30 minutes per page and catches 90%+ of principle violations before designer review.
Phase 1: 5-Second Test (1 minute)
Phase 2: Squint Test (2 minutes)
Phase 3: CRAP Checklist (10 minutes)
For each principle:
Contrast:
Repetition:
Alignment:
Proximity:
Phase 4: Gestalt and Psychology (10 minutes)
Phase 5: Responsive and Accessibility (5 minutes)
Each principle violation has a characteristic 'feel' and a specific fix. This reference connects symptoms to fixes.
Violation 1: 'Everything feels equal, no clear focal point'
Principle: Contrast, Visual Hierarchy
Diagnosis: Primary and secondary elements have similar visual weight
Fix:
1/* Increase contrast between primary and secondary */
2/* Make primary: larger, heavier, higher contrast color */
3.primary-heading { font-size: 2.25rem; font-weight: 700; color: #111827; }
4/* Make secondary: smaller, lighter, muted color */
5.secondary-text { font-size: 0.875rem; font-weight: 400; color: #6b7280; }Violation 2: 'Each section looks like a different product'
Principle: Repetition, Unity
Diagnosis: Colors, fonts, or spacing are inconsistent between sections
Fix:
1/* Ensure all sections use the same token set */
2.section-1 { background: var(--color-bg-page); }
3.section-2 { background: var(--color-bg-surface); } /* same tokens */
4.section-3 { background: var(--color-bg-page); }
5/* Never: hardcoded different colors in each section */Violation 3: 'I cannot tell which label goes with which input'
Principle: Proximity
Diagnosis: Equal spacing between labels and inputs as between form groups
Fix:
1.form-group { display: flex; flex-direction: column; gap: var(--space-1); } /* 4px label-input */
2.form { display: flex; flex-direction: column; gap: var(--space-6); } /* 24px group-group */Violation 4: 'Something looks slightly off but I cannot pin it down'
Principle: Alignment
Diagnosis: Elements have slightly different left edges or vertical positions
Fix:
1/* Check all elements have consistent horizontal positions */
2/* Use the same container padding for all sections */
3.section { padding-inline: var(--space-6); } /* all sections: same horizontal padding */
4/* Use grid columns, not manual left positions */
5.content { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }Violation 5: 'The interactive elements don't respond consistently'
Principle: Repetition, Interaction Unity
Diagnosis: Different transition speeds or hover behaviors on different elements
Fix:
1/* Define ONE transition and use it everywhere */
2:root { --transition: 150ms cubic-bezier(0, 0, 0.2, 1); }
3.btn { transition: background-color var(--transition); }
4.card { transition: box-shadow var(--transition); }
5.link { transition: color var(--transition); }
6/* Same speed = same 'feel' = consistent product */Violation 6: 'The modal feels flat, not separate from the page'
Principle: Figure-Ground
Diagnosis: Modal lacks elevation cues (shadow, backdrop)
Fix:
1.modal-backdrop { background-color: rgb(0 0 0 / 0.5); } /* ground: dimmed */
2.modal-panel {
3 box-shadow: 0 20px 60px rgb(0 0 0 / 0.2); /* figure: elevated */
4 background-color: white; /* pure white vs dimmed background = contrast */
5}Color and typography reviews have specific technical tests that go beyond the subjective 'does it look good?' question.
Color review process:
11. Open DevTools on any text element
22. Click the color swatch in Computed panel
33. Read the contrast ratio
44. Compare to requirements:
5 - Normal text (< 18px regular): minimum 4.5:1
6 - Large text (≥ 18px or ≥ 14px bold): minimum 3:1
7 - UI components (buttons, inputs): minimum 3:1
85. Check the most critical elements:
9 - Body text on page background
10 - Light gray secondary text on white (common failure)
11 - White text on action-colored buttons
12 - Placeholder text on inputs
13 - Disabled element textCommon contrast failures:
1/* FAIL #1: Light gray text on white — very common */
2.meta { color: #9ca3af; } /* 2.85:1 — fails AA */
3/* FIX: Darker muted gray */
4.meta { color: #6b7280; } /* 4.48:1 — passes AA */
5
6/* FAIL #2: Blue on light blue — badge */
7.badge { background: #eff6ff; color: #60a5fa; } /* 2.67:1 */
8/* FIX: Darker blue */
9.badge { background: #eff6ff; color: #1d4ed8; } /* 7.0:1 — passes AAA */
10
11/* FAIL #3: Green text on white — success messages */
12.success-msg { color: #22c55e; } /* 1.9:1 — fails badly */
13/* FIX: Much darker green */
14.success-msg { color: #15803d; } /* 5.0:1 — passes AA */Typography review process:
11. Check font loading (Network tab): is the web font actually downloading?
22. Check line height (Computed panel): is it unitless? Is it 1.5-1.6 for body?
33. Check font weight (Computed panel): is it a number (400, 600) not 'bold'?
44. Check font size (Computed panel): is it in rem? 1rem = 16px?
55. Check heading sizes: are adjacent heading levels at least 25% different?
66. Check line length: is body text content max-width limited to ~65ch?
77. Check letter spacing: is uppercase text letter-spaced? Is body not over-tracked?A review process only improves quality if it is consistently applied. Building it into the development workflow rather than treating it as an optional final step is the key.
Integrating review into the development workflow:
(wrong token usage, missing design system component, different spec than expected)
Common developer-specific design violations:
11. Using 'font-weight: bold' instead of numeric weight
2 Fix: always use 400, 500, 600, 700 etc.
3
42. Setting font-size in px instead of rem
5 Fix: divide px by 16, use rem always
6
73. Using absolute line-height (px) instead of unitless
8 Fix: divide line-height-px by font-size-px = unitless ratio
9
104. Not setting max-width on prose containers
11 Fix: add max-width: 65ch to any text-heavy content area
12
135. Forgetting :focus-visible styles
14 Fix: add to every interactive element in the design system foundation
15
166. Inconsistent transition speeds (100ms here, 200ms there, 0.3s over there)
17 Fix: use --transition CSS variable for all transitions
18
197. Hard-coding colors instead of using tokens
20 Fix: search for any '#' in component CSS files, replace with var(--)A complete 30-minute design review of the DevBootstrap course listing page, identifying violations and their CSS fixes.
1/* DESIGN REVIEW: Course Listing Page
2 Reviewer: Developer self-review
3 Time: 28 minutes
4
5=== PHASE 1: 5-Second Test (1 min) ===
6
7Result: PASS
8 'This is a course listing page' — heading 'All Courses' is clear
9 'I can search and browse courses' — search bar and grid are obvious
10 Primary action identified: the search input and card CTAs
11
12=== PHASE 2: Squint Test (2 min) ===
13
14Result: PARTIAL FAIL
15 Dominant elements (correctly):
16 - Page heading 'All Courses' (2.25rem/700) ✓
17 - Course card images (colored, high visual weight) ✓
18
19 Dominant elements (incorrectly):
20 - Filter buttons are too prominent at same size as search input
21 - The enrolled state course card's green border competes with card images
22
23 Fix needed:
24 1. Reduce filter button visual weight
25 2. Reduce enrolled border-color intensity
26
27=== PHASE 3: CRAP Checklist (12 min) ===
28
29CONTRAST:
30 ✗ FAIL: Category badge text #60A5FA on #EFF6FF = 2.67:1 (needs 4.5:1 for 12px text)
31 Fix: .badge { color: #1d4ed8; } /* #1D4ED8 on #EFF6FF = 7.0:1 */
32
33 ✗ FAIL: Course meta text #9CA3AF on white = 2.85:1 (needs 4.5:1)
34 Fix: .course-meta { color: #6b7280; } /* #6B7280 on white = 4.48:1 */
35
36 ✓ PASS: Course title #111827 on white = 19:1
37 ✓ PASS: Enroll button white on #2563EB = 4.8:1
38 ✓ PASS: Price #111827 on white = 19:1
39
40REPETITION:
41 ✗ FAIL: Two different border-radius values found
42 .course-card { border-radius: 12px; } /* should be var(--radius-lg) */
43 .filter-btn { border-radius: 6px; } /* should be var(--radius-md) */
44 Fix: Replace hardcoded values with tokens
45
46 ✓ PASS: Colors all from token system
47 ✓ PASS: Typography from type scale
48 ✗ FAIL: Transition inconsistency
49 .course-card { transition: box-shadow 0.2s; } /* 200ms, no easing */
50 .filter-btn { transition: all 150ms ease; } /* 150ms, different easing */
51 Fix: Both → transition: box-shadow var(--transition)
52
53ALIGNMENT:
54 ✓ PASS: All text left-aligned
55 ✓ PASS: Grid columns consistent
56 ✗ FAIL: Category badge margin-top: 3px (off the 4px scale)
57 Fix: margin-top: var(--space-1) /* 4px */
58
59PROXIMITY:
60 ✓ PASS: Card internal spacing is hierarchical
61 ✓ PASS: Filter buttons grouped tightly
62 ✗ FAIL: Section title and subtitle have same gap to content above and below
63 Fix: margin-bottom on subtitle should be smaller than margin above it
64 .section-subtitle { margin-bottom: var(--space-2); } /* was same as margin-top */
65
66=== PHASE 4: Gestalt and Psychology (8 min) ===
67
68SIMILARITY:
69 ✓ PASS: All enrolled course cards share same green border
70 ✓ PASS: All primary buttons identical appearance
71 ✗ FAIL: 'View all' links and nav links look different
72 Fix: Unify to one link style across the page
73
74FIGURE-GROUND:
75 ✓ PASS: Filter dropdown has correct shadow
76 ✗ FAIL: Tooltip has no background — white text on white
77 Fix: .tooltip { background-color: #1f2937; color: white; }
78
79COGNITIVE LOAD:
80 ✓ PASS: Clear primary action (Enroll) per card
81 ✗ FAIL: Filter section has 12 filter options visible — too many (Hick's Law)
82 Fix: Show 5 most popular, 'More filters +7' to progressively disclose rest
83
84=== PHASE 5: Responsive and Accessibility (5 min) ===
85
86375px:
87 ✗ FAIL: Filter buttons overflow, no horizontal scroll
88 Fix: Add overflow-x: auto + scroll-snap to filter container
89 ✓ PASS: Cards stack correctly at 1 column
90
91Keyboard:
92 ✗ FAIL: Filter buttons: no focus ring visible (outline: none in CSS reset)
93 Fix: Remove outline: none from all interactive elements
94 ✓ PASS: Course cards: correct focus ring
95 ✓ PASS: Tab order: logical top-to-bottom, left-to-right
96
97=== REVIEW SUMMARY ===
98
99Total violations found: 10
100 Contrast: 2 (Critical — WCAG failures)
101 Repetition: 3 (High — design system inconsistency)
102 Alignment: 1 (Low)
103 Proximity: 1 (Low)
104 Gestalt/Psychology: 3 (Medium — 1 is usability critical)
105
106Fixes applied (2 hours):
107 .badge { color: #1d4ed8; } /* contrast fix */
108 .course-meta { color: #6b7280; } /* contrast fix */
109 All border-radius → var(--radius-*) tokens
110 All transitions → var(--transition)
111 Filter: overflow-x: auto
112 Focus ring: removed outline: none from reset
113 Tooltip: bg-color #1f2937
114 Filter count: progressive disclosure at 5 visible
115
116Result: READY FOR DESIGNER REVIEW
117*/The systematic review found 10 violations in a 28-minute review. Two are WCAG contrast failures (Critical — required before any merge). Three are design system consistency violations (High — should fix before merge). The progressive disclosure fix for 12 filter buttons is a meaningful UX improvement based on Hick's Law — not a design preference, but a measurable cognitive load reduction. The tooltip fix is a figure-ground failure that makes tooltips unusable (invisible text). Each finding has a specific principle, a specific CSS value, and a specific fix — no ambiguity about what to change.
The final lesson is the Complete Design Principles Project — applying all principles from this module to design and implement a complete feature from scratch, demonstrating design thinking throughout the development process.
Your progress is saved in this browser, on this device only.