Method
Measured, not guessed
A screenshot does not tell you the exact font, the letter spacing or a button's radius. The browser knows them down to the pixel.
- 01
Open the page
A Chromium browser loads the page, scrolls to the bottom to trigger lazy-loaded content, then waits for fonts and images.
- 02
Measure
The computed styles of every visible element are read: headings, text, links, buttons, fields, cards, header and footer, plus the CSS variables in :root. The page is measured again at 375, 768, 1024 and 1440 px.
- 03
Analyze
Similar colors are grouped, each group gets a role based on its use (background, text, action, hairline), the type scale and spacing unit are inferred, and contrast ratios are calculated.
- 04
Write
Deterministic code produces the five files and links each component to the tokens. No language model: the same page gives the same file.
Method
Two measurement modes
Remote browser
The page is opened with its scripts in Cloudflare Browser Rendering. This is the most accurate mode. The result is cached for 7 days.
Local mode
When the remote browser's free quota runs out, the page is served without its scripts in an isolated area of your browser, which measures it. Stylesheets go through a relay. Limit: content built with JavaScript does not appear.
What the measurement does not see
- Hover, focus and error states: only the resting state is read.
- Media queries in stylesheets from another domain, which the page cannot read.
- Pages behind a login, and content that only appears after an action.
- In local mode, everything the site's JavaScript builds.
One URL, one file
Generate a DESIGN.md