Frontend craft
A method for building marketing frontends that hold up next to the best in the industry. It comes from a measured study of wise.com (ten pages, five widths, interaction and motion passes, media and page-system analysis) and from building a showcase with it, including the mistakes found on the way.
It is a reference for method and standards. Never reuse Wise's name, logo, typeface, artwork, copy or green palette, and never produce a page that could be mistaken for theirs. Replace every REPLACE slot in the starter with the client's own brand.
How to work
- Read
references/06-build-playbook.mdfirst. It lists what actually produces the quality, the section recipe, the numbers to hit and the QA checklist. - Get brand inputs before any component: one dark, one accent, a display face, a text face, real imagery or a plan for it. Fill the
REPLACEslots instarter/tokens.css. - Start from
starter/(tokens.css,base.css): fluid type and spacing scales, colour roles re-declared per theme class, container, button, reveal, focus ring.starter/showcase/is a complete worked page for a fictional brand; read its HTML, CSS and JS for patterns (hide-on-scroll header, hover mega menu, price tool, carousels, joined tab cards, sticky stacked cards, filterable country grid, accordion, native-dialog mobile menu). - Plan the page as sections using
references/02-layout-and-sections.md: statement, proof, show the product, reassurance, closing statement, practicalities. Decide the background sequence before designing sections. - Build each section to the anatomy in
references/03-components.md(measured sizes, states, and the close-up section anatomy at the end). Media must be large and real; media and text share one joined or themed surface; flags, icons and photographs are real assets, never stand-ins. - Motion comes from
references/04-motion.md: four named curves, a handful of durations, one spacing step of travel, colour-only hover, opt-in underprefers-reduced-motion: no-preference. - Imagery and video follow
references/07-closing-the-gaps.md: the brand hue is reserved for the product, each frame specifies its own person, light, camera and coloured props, one object per 3D illustration, and video ships as two codecs times two sizes with a poster. When generating images, review them one at a time, not on a contact sheet. - Verify in a real browser, in two engines. Use the scripts in
tools/(see below). Passing automated checks is not enough: put each section's screenshot next to a close-up of the reference section it is modelled on and judge the size and reality of what is inside it.
Rules that matter most
- Six gap values, five radii, two text weights, two brand colours, four easing curves. The discipline is the design.
- Display type about 5x body on desktop and 3x on phones; tight leading on display; tracking tightens as size grows.
- Whole sections change theme by one class; components only consume semantic tokens.
- One idea per screen: a headline, at most two sentences, one filled button.
- Phones are re-authored, not shrunk: shorter headline copy, full-width primary action, second action demoted to a link, carousels instead of stacks.
- The reference site is heavy (megabytes of JavaScript, a 2 MB stylesheet). Match the look with a fraction of the weight;
references/06-build-playbook.mdlists the targets to beat. - Test Safari's engine as well as Chromium. Two real bugs in the showcase appeared only there.
Files
| Path | Use it for |
|---|---|
references/06-build-playbook.md | Start here: recipe, target numbers, QA checklist |
references/01-foundations.md | Token architecture, colour roles per theme, fluid type and spacing formulas, radius, container, focus ring |
references/02-layout-and-sections.md | Page skeleton, vertical rhythm, 20 section patterns, responsive behaviour |
references/03-components.md | Component sizes and states; close-up anatomy of key sections |
references/04-motion.md | Easing and duration vocabulary, reveal, load sequence, reduced motion |
references/05-engineering.md | Delivery, fonts, images, video, performance, accessibility, and what not to copy |
references/07-closing-the-gaps.md | Photography and illustration art direction, image prompts that worked, video encode ladder, page-builder block schema, cross-browser, accessibility-tree and performance findings |
starter/tokens.css, starter/base.css | Brand-neutral foundation to start any build |
starter/showcase/ | Complete worked page (fictional brand, AI-generated imagery, open-licence fonts, flags and icons) |
tools/ | Browser scripts for measuring a reference site and verifying a build |
The references mention data/… and screenshots/… paths. Those are local captures of the studied site and are not distributed; regenerate them with the tools if needed.
Tools
Node scripts using Playwright. Run npm install in tools/ once (or set PLAYWRIGHT_CORE to an existing playwright-core and CHROME to a Chromium binary).
| Script | What it does |
|---|---|
crawl.js [page …] | Measure a site at five widths: type, colour, spacing, buttons, sections, media, accessibility counts; full-page screenshots |
states.js <url> <key> | Hover, press and focus diffs, header on scroll, menus, load and scroll motion, reduced motion |
section-refs.js | Close-up capture and inner anatomy of chosen sections of a reference site |
shot-showcase.js | Screenshots plus functional checks of the showcase at four widths (serve starter/ on port 8765 first) |
webkit-check.js | The same build and the reference in Safari's engine |
a11y-perf.js | Accessibility-tree snapshots and throttled-phone timings |
derive-images.js | Responsive WebP derivatives from master images using the browser's own encoder |
cssq.py, strip.py, sheet.js | Query downloaded stylesheets; build review strips and contact sheets |
To view the showcase: cd starter && python3 -m http.server 8765 --bind 127.0.0.1, then open http://127.0.0.1:8765/showcase/.