WordPress Development

Figma to WordPress: Turning a Design into a Real Theme

What a design file needs before development starts, how to translate it into a theme without pixel-chasing, and the conversations that save a rebuild later.

By 6 min read
Two stacked block layouts representing a design translated to templates

Most WordPress builds I do start with a Figma file from a designer I didn't work with. Some of those files make development straightforward and some make it a negotiation, and the difference is rarely about the visual quality.

Here's what makes a design file buildable, and how I translate one into a theme.

What a buildable design file has

  • Defined type and spacing scales, used consistently. Fifteen arbitrary font sizes means fifteen decisions I have to make on your behalf.
  • Named colour styles rather than raw hex values scattered through the file, so the palette is a system.
  • Components for repeated elements, so a card is one thing with variants rather than nine similar frames.
  • At least two breakpoints — desktop and mobile — for anything whose layout genuinely changes. Tablet can usually be inferred; the mobile navigation cannot.
  • Interactive states: hover, focus, active, disabled, error. Focus states in particular are almost always missing, and they're an accessibility requirement.
  • Realistic content, not lorem ipsum at a convenient length.

The states designs don't show

Designs show the ideal case. Real sites don't stay in it, and the gap is where most post-launch complaints come from.

  • Empty states: a category with no posts, a search with no results, a testimonials section before there are any testimonials.
  • Overflow: a product name three times longer than the one in the design, a navigation item that wraps, a price with more digits.
  • Long content: what a 4,000-word article looks like in a layout designed around 600 words.
  • Missing images: what a card does when there's no featured image.
  • Loading and error states for anything asynchronous.
  • Ask about these before building. Deciding them during development means I'm designing, which is not what anyone hired me for.

Translating design tokens into a theme

The first thing I extract from a design file isn't a layout, it's the system underneath it: the colour palette, the type scale, the spacing scale, the border radii, the shadows.

Those go into theme.json and CSS custom properties, which makes them available as editor controls and as variables throughout the stylesheet. A colour changed in one place then changes everywhere it's used.

This also constrains editors usefully. When the colour picker offers the five brand colours rather than an arbitrary spectrum, and the font size control offers the type scale rather than free text, the site still looks designed in two years.

Identifying the components

Before writing templates, I go through the design and list the repeated pieces: the card, the hero, the feature grid, the call to action, the testimonial, the accordion.

Each becomes a template part, a block pattern, or a custom block depending on who needs to place it and how much it varies. A component editors place themselves becomes a block with constrained options; one that only appears in a fixed position becomes a template part.

This step is where the build either gets efficient or doesn't. Building twelve pages as twelve layouts is slow and produces a site where a change has to be made twelve times.

Pixel-perfect, honestly

Clients ask for pixel-perfect and they mean 'it should look like the design', which is reasonable. Taken literally it's the wrong goal, because the design was drawn at one width with one content length and the web is neither.

What I aim for instead: identical at the design's breakpoints with the design's content, and sensible everywhere in between and beyond. Spacing from the scale rather than eyeballed per element. Type that scales smoothly rather than jumping at breakpoints.

The places I'll deviate deliberately: tap targets too small for a thumb, contrast that fails accessibility requirements, a hover-only interaction that has no touch equivalent, and text in images. I'll raise each of those rather than silently implementing them or silently changing them.

Performance decisions in the design

Some design choices have costs that aren't visible in the file, and it's much cheaper to discuss them before the build than after a Core Web Vitals report.

  • Number of font weights. Each is a separate download; two is usually enough.
  • Large hero images, particularly full-bleed background images which the browser discovers late.
  • Carousels, which are heavy, rarely interacted with past the first slide, and awkward for accessibility.
  • Scroll-triggered animation, which costs main-thread work on exactly the devices that can least afford it.
  • Custom icon fonts, where inline SVG is smaller and sharper.
  • None of these are forbidden. They're trade-offs worth making knowingly.

The questions worth asking before starting

  • Which parts of this will editors need to change themselves, and how often?
  • Which sections repeat across pages, and should they be identical everywhere?
  • What happens to this layout when the content is twice as long?
  • Is this section's content coming from a custom post type, or is it hand-written per page?
  • Are these images uploaded by editors, and if so at what aspect ratio?
  • Is there a design system this should feed into, or is this a one-off?

Naming things so the build matches the design

A small habit that saves a surprising amount of back-and-forth: name the components in the design the way they will be named in the code and in the editor.

  • If the design calls it a Feature Card and the block is called Feature Card, a review comment about the feature card is unambiguous.
  • Name components for what they are, not where they currently sit. HomepageBox becomes wrong the moment it appears on a second page.
  • Keep the colour style names semantic rather than literal. Brand Primary survives a rebrand; Purple does not.
  • Name the spacing and type scale steps once, and use the same names in theme.json. Then a conversation about spacing is about a named step rather than a number someone measured off a screenshot.
  • Where a component has variants, name the variants too, because those become the options an editor sees in the sidebar.

Reviewing the build

Review it with real content, not the design's content. A build that looks right with lorem ipsum and wrong with the actual copy isn't finished.

Review it on an actual phone, not a browser window resized to phone width. Touch targets, scrolling behaviour and font rendering all differ.

Check the states: an empty category, a long title, a missing image, a focused form field. These are where the difference between a careful build and a quick one shows.

And check it with the editor in mind: can the person maintaining this site produce a new page that looks right, without a developer?

Frequently asked questions

What does a developer need from a Figma file?

Consistent type and spacing scales, named colour styles, components for repeated elements, at least desktop and mobile breakpoints, interactive states including focus, and realistic content. The underlying system matters far more than the number of screens drawn.

Can a WordPress theme be pixel-perfect to a design?

At the design's breakpoints with the design's content, yes. Taken literally across every viewport and every content length, no — the design was drawn at fixed widths and the web isn't. Faithful at the breakpoints and robust everywhere else is the goal worth having.

Should the designer or the developer decide the mobile layout?

The designer, for anything where the layout genuinely changes — the navigation especially. A developer inferring the mobile design is a developer designing, and you'll get their judgement rather than the designer's. Tablet can usually be inferred; mobile navigation cannot.

How do I hand off a design for a WordPress build?

Along with the file, say which parts editors will change themselves, what happens when content is longer than shown, and what the empty states look like. Those three answers prevent most of the back-and-forth, and they're rarely in the file itself.

Are there design choices that hurt WordPress performance?

Several: many font weights, full-bleed background images the browser discovers late, carousels, scroll-triggered animation, and custom icon fonts. None are forbidden — they're trade-offs, and they're much cheaper to discuss before the build than after a Core Web Vitals report.

Topics

  • Figma to WordPress
  • design to WordPress
  • WordPress theme from design
  • pixel perfect WordPress