You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
5. Loop through the 4 languages: `switchLanguage(lang)` → re-apply zoom (it can reset on language switch) → take screenshot → save to `src/{lang}/images/<file>.png`.
73
+
6. Reset zoom (`document.body.style.zoom = ''`) before moving to the next screen.
72
74
73
75
This pattern is ~4× faster than re-navigating to `/usersettings` for each language and avoids repeating the page setup four times.
74
76
75
77
## Capture Standards
76
78
77
79
### Resolution and Size
78
80
79
-
-Capture at standard display resolution (not Retina/HiDPI unless necessary)
81
+
-**Always capture at 2× CSS zoom for sharper text rendering** when capturing via Playwright MCP. Apply `document.body.style.zoom = '2'` and resize the viewport to fit the zoomed layout (e.g., `2000×1500` for full-page captures, or sized to the target element) before taking the screenshot. This effectively doubles the pixel density of the captured PNG without requiring a Retina display or `deviceScaleFactor` change to the browser context.
80
82
- Crop to show only the relevant UI area, not the entire browser window
81
83
- Include enough surrounding context for users to identify where they are in the app
82
-
- Target file size: under 500KB per image where possible
84
+
- Target file size: under 500KB per image where possible (2× zoom captures may exceed this for large pages — that is acceptable when text legibility benefits)
85
+
86
+
#### 2× zoom capture procedure
87
+
88
+
```javascript
89
+
// 1. Apply 2× zoom to body before capture
90
+
document.body.style.zoom='2';
91
+
92
+
// 2. Resize viewport so the zoomed element fits
93
+
// (use browser_resize with width/height roughly 2× the natural CSS dimensions)
94
+
95
+
// 3. Switch language and remove dev overlays as usual, then capture via element ref:
// 4. After all four language captures for a screen, reset zoom before moving on:
99
+
document.body.style.zoom='';
100
+
```
101
+
102
+
The resulting PNG will be ~2× the natural CSS dimensions in pixels (e.g., a 450×700 modal becomes a 900×1400 PNG), giving noticeably sharper text and icons in the docs.
103
+
104
+
> **Note on `Match the Existing Screenshot's Framing`** (below): the framing *scope* contract is unchanged — only the pixel density doubles. A modal that was 450×700 at 1× zoom becomes 900×1400 at 2× zoom; both show the same modal-only scope.
0 commit comments