Skip to content
Arrow keys to move, Enter to open, Esc to closeAll results
Design and Builders · Guides

How to Build a Design System With Automatic.css

A practical tutorial for building a small WordPress design system with Automatic.css: tokens, naming, components, dark mode, governance, performance and migration.

Written by
WPresident Editorial
Topic
Design and Builders

Every WordPress site that lives long enough develops the same condition. The home page uses one purple, the services page uses a slightly different purple, and a landing page built in a hurry by someone else uses a third. Buttons have three corner radii. Section padding is one value here, a similar value there, and whatever looked right on the pricing page. Nobody chose any of this. It accumulated, one reasonable local decision at a time, and now a rebrand means opening every page and fixing it by hand.

A design system is the cure, but the phrase scares people into picturing a 200-component library maintained by a department. At WordPress scale it is far smaller and far more useful: a short list of design decisions, each with a stable name, plus a few rules about who may change them and how. Colours, type sizes, spacing steps, a corner radius, a couple of shadows, and a handful of components built from those. That is enough to keep a 40-page marketing site, a membership site with three editors, or an agency’s portfolio of client sites coherent for years.

The single most important idea in this tutorial is that a design system is mostly decisions and names, and the tool only stores and enforces them. A token framework such as Automatic.css (ACSS) is a good place to store them. You enter a few choices in a settings screen, and it generates a consistent set of CSS variables, colour shades and size scales that your builder can reference by name. But no tool can make the decisions for you, choose names your team will remember, or stop someone pasting a raw hex code into a page at five o’clock on a Friday. Those are human problems, and much of this guide is about them.

The build order is the one that keeps rework lowest: decide the inputs on paper, then the tokens in the order colour, type, space, radius and shadow, then naming, components and dark mode. The second half is about keeping the system alive: documentation, governance, consistency across several editors, performance, migration, and recognising when a plain CSS token file is all you need.

A word on versions and certainty, because it affects how you should read every example. Automatic.css version 4 is a clean break from version 3, and it has been distributed as alpha-stage builds. Variable names, settings screens and defaults can change before it settles. Wherever this guide names a specific ACSS variable, setting or class, treat it as something to verify in the vendor documentation for the exact build you installed. The method does not depend on the version. The same system can be built on another framework or on a plain stylesheet, and the final section says when that is the better choice.

Two more ground rules. Numbers in the examples are illustrative scenarios, not measurements, and there are no performance figures here: the guide tells you how to measure your own site. The code is conservative, ordinary custom properties and standard CSS, plus common WP-CLI and shell commands. Try everything on a staging copy first, because a design system touches every page at once.

Key points

  • A small design system is a short list of named decisions plus rules for changing them, and it pays off once a second person edits the site or a second site shares the look.
  • Decide colour roles, type scale, spacing, radius and shadows on paper before you open any settings screen, because the tool only stores the decisions.
  • Name tokens by purpose rather than appearance, and keep three tiers: framework tokens, your own role aliases and local component variables.
  • Build components from tokens, and make variants change variables rather than rewriting rules, so one change still reaches everything.
  • Use color-scheme and light-dark() for dark mode, then check images, shadows, borders and contrast by hand.
  • Governance is one owner, a clear promotion rule for new tokens and a regular audit for stray hard-coded values.
  • Treat Automatic.css 4 as pre-release until the vendor says otherwise, and remember that a plain CSS token file is a legitimate choice for a small site.

What a design system is at WordPress scale

Strip away the conference-talk version and a design system does three jobs. It remembers decisions, so nobody has to re-decide the shade of a link on every page. It makes the correct choice the easy choice, so picking the standard spacing is faster than inventing a new value. And it makes change cheap, so a rebrand is an afternoon of editing inputs rather than a month of opening pages. If your setup does not do all three, you have a stylesheet, not a system.

It helps to name the parts, because teams argue less when each word means one thing.

  • Token: a named design decision stored as a value, usually a CSS custom property such as a brand colour or a spacing step.
  • Base style: how bare HTML elements look: headings, paragraphs, links, lists and focus rings.
  • Component: a reusable piece of interface built from tokens, such as a button, card or form field.
  • Variant: a sanctioned change to a component, such as a featured card or a secondary button.
  • Pattern or template: a larger arrangement of components, such as a hero with proof points, or the layout every blog post shares.
  • Rule: a written constraint, such as a minimum text size or the statement that only the owner adds tokens.

These parts stack, and the stack explains why order matters. Tokens sit at the bottom, so a change there ripples upward through everything built on top. That is the whole point of a system, and it is also the danger: renaming a token is a breaking change for every component above it. This is why tokens are decided first and changed rarely, while patterns change often.

It also helps to say what a design system is not. It is not a plugin. A plugin can generate tokens and ship utility classes, but the system is the agreement between the people who build pages. And it is not a one-off project. A system nobody maintains turns into the pile of conflicting values it was meant to replace, only with nicer names.

Who needs one? A single-page brochure site edited by its owner does not. The case builds as soon as any of these is true: more than one person edits pages, more than one site shares a look, the site has repeating page types such as case studies or product pages. Picture a services firm with 40 pages, a blog and three editors. Without a system, every editor eyeballs spacing and every page drifts. With a small one, colours, type, spacing and half a dozen components are decided once, and drift becomes a visible exception instead of the default.

The layers of a small design system

RulesWritten constraints: who may add tokens, minimum text sizes, when to use which component.
Patterns and templatesHero sections, card grids, the layout every article shares.
Components and variantsButtons, cards, callouts and form fields, each built only from tokens.
Base stylesHeadings, paragraphs, links, lists and focus rings for bare HTML.
TokensColour roles, type scale, spacing steps, radius and shadows.
InputsBrand decisions made on paper: palette, tone, density and accessibility targets.
Each layer is built from the one beneath it, so a change near the bottom reaches everything above, and a rename near the bottom breaks everything above.

What a token framework generates, and where Automatic.css 4 fits

A token framework turns a few design inputs into a consistent set of CSS custom properties, usually with extras around them. You pick a brand colour, a base text size, a scale ratio and a spacing unit. The framework does the arithmetic: shades of each colour, a ladder of text sizes, a ladder of spacing steps. What reaches the browser is a stylesheet of variables on the root element, plus whatever classes the framework ships. Everything else in the system, your components and templates, is written by you or your builder against those names.

Two families exist. Generators, such as Automatic.css and Core Framework, live in WordPress as plugins with a settings screen and write the stylesheet for you. Hand-written token files are a single stylesheet you maintain yourself. Generators save arithmetic and add a dashboard, at the cost of a dependency and a vocabulary you must learn. Hand-written files cost nothing and teach you everything, at the cost of doing the scales and shades yourself. The rest of the guide works for either.

Here is what the vendor documentation says about version 4, which matters because it differs from version 3 in several ways. It describes the framework as variable-first and BEM-first. Most of the old utility-class modules are gone, and you are expected to write your own classes against the variables, with a smaller set of ready-made recipes, prefixed with a question mark, in their place. Colours use the OKLCH colour model. Light and dark mode use the CSS color-scheme property and the light-dark() function. The old transparency tokens were removed in favour of the browser’s color-mix() function and relative colour syntax. The framework implements CSS cascade layers, so you have more control over specificity. It is breakpoint-free, with fluid sizing instead of presets that switch at fixed widths. And the largest t-shirt size, formerly XXL, is now called 2XL.

On builders, the documentation lists Etch as the flagship integration, with Gutenberg and Bricks Builder also supported, and names several earlier integrations as dropped. If you use a builder outside that list, read the docs before planning around version 4.

Two cautions should shape your plan. First, version 4 is not backward compatible with version 3, and the vendor’s own guidance is to keep existing sites on 3.x and start new projects on 4. Adopting version 4 on an existing site is therefore a migration, covered later, not an update. Second, version 4 has been distributed as alpha-stage builds. Check the vendor changelog for which release is current and whether it is still labelled pre-release. Until it settles, assume that variable names, settings and recipes can change, keep your own names in front of the framework’s (the naming section shows how), and keep a settings export under version control. The documentation lists import, export and reset of settings as part of version 4, which makes that practical.

coreframework.com
The Core Framework home page, headed Your Design System Now Open Source, with buttons to download for WordPress or view on GitHub and a preview of its colours and typography panels.
Core Framework is a different generator built on the same idea: choose colours, type and spacing once, then reuse them by name.

Decide the inputs before you open the settings screen

The cheapest hour of the whole project happens before you install anything. Open a plain text file and write down the decisions the framework will later ask you for. This is where the system actually gets designed, and every shortcut here returns as rework.

Start with a two-line brief: who reads the site, and what tone the design should carry. A legal practice and a skate shop need different density, contrast and corner radius, and no framework default knows which one you are. Then work through seven decisions.

  1. Colour roles. A primary action colour, an optional secondary and accent, a neutral ramp for text and surfaces, and status colours for success, warning, error and information. Decide roles before hues.
  2. Type. One or two font families, a base size, a scale ratio, heading weights and line heights. Fewer families load faster and look more coherent.
  3. Space. One base unit and a short ladder of steps, plus a separate decision for section padding and grid gaps.
  4. Radius. A single corner style: sharp, softly rounded or fully rounded. Zero is a legitimate brand decision.
  5. Elevation. Two or three shadow levels at most, defined by purpose, such as a raised card and an overlay.
  6. Motion. A standard duration and easing for hover and focus transitions, plus a rule to respect reduced-motion preferences.
  7. Layout. Container widths, gutters and the line length for reading text.

Next, set the constraints your numbers must satisfy. Text on every surface should meet the contrast targets in WCAG 2.2 level AA: at least 4.5 to 1 for body text, and 3 to 1 for large text and interface components such as input borders. Decide now which text colours sit on which surfaces, because those pairs become the tokens you cannot afford to get wrong. Set a minimum body size. Decide whether the site needs a dark scheme at all, since that changes how you define colours.

For proportions, a widely used heuristic is 60-30-10: roughly sixty per cent dominant neutral, thirty per cent secondary and ten per cent accent. It is a starting guide, not a law, and mostly stops the accent colour spreading until nothing stands out.

Finally, write each decision down with a reason. A line such as “radius is zero because the brand is editorial and angular” will save an argument eight months from now. If you are working for a client, get sign-off on this page before building. Changing a decision now costs minutes. Changing it after forty pages depend on it costs far more, even with tokens, because tokens only make change cheap where pages actually use them.

Colour tokens: roles first, shades second

Colour is where most systems fail first, and the usual cause is naming by appearance. If your tokens are called purple-600 and green-400, every component is welded to a hue. A rebrand to teal then means renaming everything or living with a lie: a variable called purple that holds teal. Name by role instead. A role says what a colour is for, and the value behind it can change without any component noticing.

Keep two ideas separate in your head. The palette is the set of raw colours and their generated shades. The roles are the jobs those colours do. The ACSS documentation has a palette section and a separate colour assignments section, and whatever your build calls them, hold the same split in your own system. For the palette, the documentation lists generated shades such as ultra light, light, medium, dark and ultra dark, plus a hover variant, with adjustable lightness and saturation. Components should talk to roles, never straight to palette shades.

A small set of roles covers most sites:

  • Primary: the action colour for buttons, links and active states.
  • Secondary and accent: used sparingly, for emphasis and variety.
  • Base and neutrals: the page surface, plus a ramp for body text, muted text, borders and quiet backgrounds.
  • Status: success, warning, danger and information.
  • Focus: the outline colour for keyboard users, which must stand out on every surface.

Then attach a text colour to every surface role. The most common contrast bug is a tinted background that received the body text colour because that colour was only ever tested on white. Write the pairs down: text on base, text on the soft primary tint, text on primary itself, text on each status tint. Check each pair against the WCAG AA targets. Version 4 computes colours in OKLCH, a colour model designed to track perceived lightness more closely than HSL, so a given shade step should look similar in lightness across hues. That is helpful, but it is not a contrast guarantee, so measure the pairs you actually use.

For tints and overlays, version 4 points you at native CSS rather than ready-made transparency tokens. The color-mix() function blends a token with transparency or with another token, so one colour yields as many tints as you need.

.ds-callout {
  background: color-mix(in oklch, var(--primary, #5B21B6) 12%, transparent);
  border-left: 4px solid var(--primary, #5B21B6);
  color: var(--neutral-ultra-dark, #1F1B2E);
}

Remember that a translucent tint takes on whatever sits behind it, so check text contrast on the blended result, in both light and dark schemes. Finally, never let colour carry meaning alone. A red border for an error and a green one for success fail for people with colour-vision differences, so pair status colours with an icon or a word.

Naming colours by appearance versus by role

Named by appearanceNamed by role
Example namespurple-600, green-400primary, success
When the brand changesRename every use, or keep a misleading nameChange one input; every name stays true
Dark modeEach component must pick a dark partnerThe role maps to its own dark partner
What a reviewer readsA hue with no stated purposeThe job the colour is doing
Main riskHues leak into componentsRoles multiply until they blur
Role names survive a rebrand because the name describes the job, not the hue.

Type, space, radius and shadow tokens

After colour, four families of tokens carry most of a site’s visual consistency. Each follows the same pattern: a short ladder of named steps, a rule for which step does which job, and a ban on values outside the ladder.

Type. A fluid type scale gives each step a minimum size for small screens and a maximum for large ones, and interpolates between them. ACSS expresses text sizes as a t-shirt ladder, with names such as text-xs through text-xl and beyond. Set the minimum and maximum deliberately, then test the extremes and browser zoom at 200 per cent. Sizes should resolve to rem so that a reader’s browser font setting still scales your page. Map each heading level to a step once, in your base styles, and forbid ad hoc font sizes inside pages. Give body text a looser line height than headings, and cap reading width with the ch unit, commonly somewhere around 45 to 75 characters per line. Use two font-family tokens at most, one for headings and one for body, each with a sensible system fallback, and load the web fonts with font-display set to swap.

Space. Spacing steps use the same t-shirt idea, from extra small up to 2XL in version 4. Use them for padding, margins and gaps, never for widths. Treat section padding as its own token, since it is larger and more fluid than component spacing. A good working rule: the more closely related two things are, the smaller the step between them. Allow exceptions for genuine optical adjustments, but require a comment so the next person knows it was deliberate.

Radius. One value for most things, and perhaps a second for pills or avatars. A radius of zero is a valid choice and still deserves a token, so that changing your mind later is a one-line edit.

Shadow and borders. Define elevation by purpose, not by size: a raised surface and an overlay is usually enough. Because shadows are barely visible on dark surfaces, plan to signal elevation in dark mode with a lighter surface or a border instead. Define the border width and a border colour once. The framework’s own shadow names vary by version, so the example below defines them in your own namespace and derives the line colour from the ink colour.

:root {
  --ds-radius: 0;
  --ds-shadow-raised: 0 1px 2px rgb(0 0 0 / 0.08), 0 2px 6px rgb(0 0 0 / 0.06);
  --ds-shadow-overlay: 0 8px 24px rgb(0 0 0 / 0.14);
  --ds-line: color-mix(in oklch, var(--neutral-ultra-dark, #1F1B2E) 15%, transparent);
}

.ds-prose {
  max-width: 65ch;
  font-size: var(--text-m, 1rem);
}

Naming conventions that survive a team

Once tokens exist, naming decides whether the system stays readable. The convention that scales best uses three tiers, each with a different owner and a different rate of change.

  1. Framework tokens. Generated by the tool, such as the primary colour, its shades or a text step. Treat these as read-only inputs. Do not rename them and do not hand-edit them in the output.
  2. Role aliases. Your own names, prefixed, that point at framework tokens: ink, muted, surface, action, focus. This is the vocabulary your team actually speaks.
  3. Component variables. Local custom properties set inside a component, such as a card’s padding. They point at role aliases and never leave the component.

The alias tier earns its keep in three ways. It insulates you from the framework, which matters while version 4 is pre-release: if a token is renamed, you edit one alias instead of hunting through components. It gives you names in the team’s own language. And it gives you one place to put fallback values, which brings us to a subtle trade-off. Writing var(–primary, #5B21B6) means the page still renders if the framework’s stylesheet is missing, for example when a plugin is deactivated or a cache serves a stale file. But a fallback is a second source of truth that can drift from the real token, and it can hide mistakes: a typo such as var(–primry, #5B21B6) renders fine forever and never warns you. The remedy is to write fallbacks once, in the alias tier, and keep components free of them.

:root {
  --ds-action: var(--primary, #5B21B6);
  --ds-action-soft: var(--primary-ultra-light, #EDE9FE);
  --ds-ink: var(--neutral-ultra-dark, #1F1B2E);
  --ds-muted: var(--neutral-semi-dark, #5B5670);
  --ds-surface: var(--base, #FFFFFF);
  --ds-focus: var(--focus-color, #2563EB);
}

Some rules keep the vocabulary clean. Name by purpose, not appearance. Choose one word per idea, so the team says ink or text but not both. Prefix everything you own, which prevents collisions with the framework, with plugins and with other developers. Use lowercase with hyphens. Reserve t-shirt sizes and numbers for genuine scales, and never put a value in a name. Keep the alias set small, a few dozen at most for a typical site.

Class names follow the same discipline. Version 4 is described as BEM-first, so use block, element and modifier with your prefix: ds-card, ds-card__title and ds-card–featured. Allow one level of element only, since chains such as a__b__c signal a component that should be split. Modifiers change variables rather than rules, which the components section develops.

How one decision travels from settings to a declaration

  1. InputThe brand colour you entered in the framework settings.
  2. Framework tokenA generated variable such as primary, with its shades.
  3. Role aliasYour own name, such as action, holding the fallback once.
  4. Component variableA local name such as the card accent, set inside the component.
  5. DeclarationThe border or background rule that finally uses the value.
Each hop is a place where a name can change without breaking anything downstream, as long as you only edit the hop that moved.

Components and variants built from tokens

A component is a class block with one job and a small set of its own variables. A button, a card, a callout, a form field, a section wrapper, a header and a footer cover most marketing sites. Build each in a fixed order: write the base using only role aliases and spacing steps, add variants by overriding the component’s own variables, and only then add states. This keeps variants cheap. A featured card does not repeat the card’s rules. It changes two variables.

@layer components {
  .ds-card {
    --card-pad: var(--space-l);
    --card-bg: var(--ds-surface);
    --card-accent: var(--ds-line);
    padding: var(--card-pad);
    background: var(--card-bg);
    border: 1px solid var(--card-accent);
    border-radius: var(--ds-radius);
    box-shadow: var(--ds-shadow-raised);
  }

  .ds-card--featured {
    --card-bg: var(--ds-action-soft);
    --card-accent: var(--ds-action);
  }
}

Spacing and type steps are scales, not roles, so components may use them directly, as the card does above. The price is a find-and-replace if the framework ever renames its scale, which is usually a better deal than aliasing fifteen steps one by one. Colours, radius and shadows go through your aliases.

Specificity needs a policy. Use single-class selectors, no IDs and no important flags, so any later rule can override an earlier one without a fight. Cascade layers make the order explicit, with one trap worth knowing: styles outside any layer beat layered styles regardless of specificity, so page-level custom CSS will override your layered components. That is often what you want, but it should be deliberate. A layer’s rank is fixed by the first place its name appears, so check the layer names and order that your installed framework version declares, and state your own order once, early.

States are where components quietly break accessibility. Give every interactive element a visible focus style using your focus alias on the focus-visible pseudo-class, and never remove an outline without replacing it. Keep touch and click targets at least 24 by 24 CSS pixels, the WCAG 2.2 AA minimum, and larger for primary actions. Style disabled and error states with more than colour.

Version 4 ships ready-made recipes, prefixed with a question mark, for some common elements such as buttons. Adopt a recipe only when it matches your written decisions, and read its documentation for the exact syntax in your build. If you write your own, the same prefixed BEM approach applies. In a builder such as Etch, Bricks or the block editor, keep component CSS in global or shared styles rather than per-page styling, so one edit reaches every page that uses the component.

etchwp.com
The Etch Studio product page, showing code-style labels such as a posts loop, an author name key and a component tag around the headline One Builder, Multiple Platforms, Unlimited Possibilities.
Etch is the builder the Automatic.css 4 documentation lists as its flagship integration, and a natural home for reusable components that carry your class names.

Dark mode without a second stylesheet

Decide first whether you need it. A site with a strong light brand and an audience that has never asked may be better served by spending the effort elsewhere. If you do need dark mode, a token system makes it far cheaper than it used to be. The old approach, copying every variable into a prefers-color-scheme media query, is no longer necessary in current browsers.

The modern mechanism has two parts. The color-scheme property tells the browser which schemes an element supports, light, dark or both, and native form controls and scrollbars follow it. The light-dark() function takes two colours and returns the first in a light context and the second in a dark one, so a single variable resolves differently depending on the active scheme. The ACSS documentation describes this setup. It sets color-scheme on the root from a website scheme setting, so the browser can follow the visitor’s preference. Shades get an auto-inverted dark value, so an ultra-light shade maps to its ultra-dark partner. Main and hover colours take their dark values from override settings if you set them. Components that use primary, a dark shade or the base colour then need no scheme-specific code.

The documentation also describes two classes, scheme–light and scheme–dark, that force a scheme on their own subtree. That is useful beyond dark mode: a dark call-to-action band on a light page is simply a dark-scheme section, and every token inside it flips on its own.

<section class="ds-cta scheme--dark">
  <h2 class="ds-cta__title">Ready to start?</h2>
  <a class="ds-button" href="/contact/">Get in touch</a>
</section>

One subtlety concerns your alias tier. An alias that points at a token containing light-dark() holds a string of CSS, not a resolved colour, so it should resolve in the scheme of the element that finally uses it. That is the behaviour you want, but confirm it in a scoped dark container on your own build before relying on it.

Plan a manual pass for what will not flip by itself: hard-coded colours, logos and screenshots with baked-in white backgrounds, SVGs with fixed fills, embedded widgets, charts, and shadows. Re-check contrast for every text and surface pair, since a tint that passed in light mode may fail in dark. If you offer a visitor toggle, store the choice and apply it before first paint to avoid a flash of the wrong scheme. And because light-dark() is newer than the older media-query approach, check your audience’s browser support policy against a compatibility table before committing.

Two ways to build dark mode

Duplicate variables in a media querycolor-scheme and light-dark()
Where dark values liveA second block repeating every variableInside the same variable, as a pair
Forcing one section darkExtra classes that redefine variablesSet the scheme on that container
Native controls and scrollbarsStyled by handFollow the declared scheme
MaintenanceTwo lists to keep in syncOne list showing both values together
Main riskA forgotten variable stays lightOlder browsers without light-dark() support
The newer approach keeps both values side by side inside one variable instead of maintaining a second list.

Document the rules where people will actually find them

Documentation fails when it is long, stale or far from the work. A small system needs five short artefacts, kept in one agreed place.

  1. Foundations page. The inputs from your planning step and the reason behind each: roles, scale, radius, motion, contrast targets.
  2. Token reference. Every alias, a one-line purpose, and which framework token it points at. Export your framework settings and keep that file with the project, because version 4’s documentation lists import and export of settings, and a dated export is a restore point.
  3. Component catalogue. A private page that renders every component and variant in light and dark. It doubles as a manual regression check: open it before and after any plugin update or token change. Keep it password-protected and out of search results.
  4. Usage rules. Ten at most, phrased as do and do not. For example: colours come from aliases, never a typed hex; spacing comes from the ladder; variants come only from modifiers; one top-level heading per page.
  5. Decision log. One entry per token change, so the reasons outlive the people.

A decision log entry can be a few lines of YAML in a text file in your repository, or the same fields in a shared document:

token: --ds-action-soft
kind: colour role
requested_by: marketing editor
reason: three components need the same light tint of the primary colour
used_in: card, callout, form hint
replaces: four hard-coded light purples in landing page templates
dark_mode: auto-inverted shade, contrast checked
status: approved
review: next quarterly audit

Keep documentation one hop from where people work. If the team lives in a Git repository, a docs folder beats a wiki nobody opens. If editors work in WordPress, a private page in the admin area beats a PDF. Version the system, even informally: a short changelog with a number and a date, tied to the settings export it describes, tells everyone which vocabulary a given page was built against.

Test the documentation the way you would test a form. Hand it to someone who did not build the site and ask them to assemble a page with a hero and a three-card grid without asking you anything. Every question they ask is a hole in the documents. Fix the hole, not the person.

Governance: who may add a token, and how you spot drift

Tokens do not enforce themselves. The moment a second editor can type a hex code into a colour field, the system depends on rules and habits. Governance sounds heavy, but for a small team it comes down to three decisions: who owns the system, how a new token gets in, and how you notice drift.

Ownership. Name one role, the system owner, who approves changes to tokens and shared components, with a deputy for absences. That might be a developer, a lead designer or an agency’s technical lead. Everyone else may propose.

Admission. A request arrives as the decision-log entry from the previous section. The owner first checks whether an existing token does the job within a small difference, because near-duplicates are how scales rot. If not, the promotion rule in the diagram decides. Approved tokens are added in the framework settings and the alias tier, checked in dark mode and for contrast, documented, logged and announced. Batch these into planned releases rather than trickling them in, and view the component catalogue on staging before anything goes live.

Retirement. Never delete a token that pages might still use. Mark it deprecated in the documentation, search for its use, migrate those places and remove it in the next planned release.

Spotting drift. Run two audits on a schedule, quarterly for most teams. The first looks in files for colour values typed outside the token file. Because fallbacks legitimately contain hex codes, a pattern search that skips lines containing a variable reference is simpler than a linter rule that bans hex outright.

$ grep -rnE '#[0-9a-fA-F]{3,8}' wp-content/themes/my-theme --include='*.css' | grep -v 'var(--' | grep -v tokens.css

The second looks in the database, because builders and the block editor store styles inside post content and metadata, not in files. Search for a specific value, such as a retired brand colour, on a staging copy of the site:

$ wp db search '#5B21B6'

Everyday consistency. Reduce the number of places where a wrong value can enter. In the block editor, disable the custom colour picker so editors choose from the palette; theme.json has settings for this. In builders, limit who can paste custom CSS or per-element styles using roles and permissions where the tool allows. Give editors templates, patterns and locked layouts instead of blank canvases, and review changes to shared CSS the way you would review code.

Should this value become a token?

Someone asks for a new colour, size or spacing value. What happens?
It is needed in three or more places, or in two different componentsPromote it: add a token and an alias, document its role, check dark mode and contrast, and log the decision.
It is needed in one component onlyKeep it as a local component variable with a comment, and do not add it to the shared vocabulary.
It is close to an existing tokenUse the existing token. Small differences are how scales rot and how audits become impossible.
It is for one campaign pageScope it to that page with an expiry date in the log, and remove it when the campaign ends.
A simple promotion rule stops the token list from growing with every one-off request.

Performance and bloat: what a design system costs

A design system costs bytes in several ways, and the framework is only one of them. Measure before you assume where the weight sits.

Generated framework CSS. Its size follows what you switch on: enabled modules, utility classes, recipes, colour shades. Version 4’s documentation says it removes most utility modules, alternate colours and transparency tokens, and describes greatly reduced CSS output. That is a vendor statement. Verify it by comparing your own before and after on the same site rather than taking it on trust.

The variables themselves. Declaring custom properties on the root is cheap, and an alias chain a few hops deep is not a practical concern. Avoid redefining hundreds of variables on many different elements. Set tokens at the root and component variables at each component’s own root.

Builder-generated CSS. Per-element styles and inline declarations produced by a visual builder can outweigh the tokens. Here a system helps performance: pages that apply shared classes carry fewer unique rules than pages styled element by element.

Fonts and plugin CSS. Web fonts are often the heaviest single design choice. Limit families and weights, subset where you can, and preload only the font needed for first paint. Plugins such as form and slider tools may bring their own stylesheets, so a system that wraps them in your own variables gets visual consistency without removing their CSS.

Caching and optimisation tools interact with the system in specific ways. Serve generated CSS with long cache lifetimes and a version string that changes when the file does. Let your cache or performance plugin minify it. Be careful with features that remove unused CSS: they can strip rules that only apply to variants used on some pages, to the dark-scheme classes, or to state selectors, so keep a safelist and test. If you use critical CSS, make sure the variable declarations are included in it, or first paint can lose its colours until the full file arrives. Dark mode through light-dark() adds no second stylesheet, which is one of its quiet advantages.

To measure, use the browser’s developer tools. The Network panel shows each stylesheet and its transfer size, and the Coverage panel shows how much of each file a page actually used. Compare the same page under the same throttling, with a cold and a warm cache, before and after each change. Chasing zero unused CSS is a mistake. A modest amount of unused CSS is a fair price for consistency.

Where a design system adds weight

Generated framework CSSVariables plus any utilities and recipes you enable; size follows what you switch on.
Your component CSSGrows with the number of components and variants you write.
Builder-generated CSSPer-element rules and inline styles; shrinks as pages use shared classes instead.
Web fontsFamilies, weights and styles; often the heaviest single design choice.
Plugin stylesheetsForms, sliders and widgets that ship styles of their own.
Check each layer separately, because the framework stylesheet is rarely the only or the largest contributor.

Migrating an existing site onto the system

Migration is the hardest part, because the old site has no tokens and the content already exists. The principle is to migrate by layer, not by page, and to let old and new styles coexist until the last user of an old rule is gone.

Inventory. List every colour, font size, spacing value and radius actually in use. In theme files, a quick count shows which hex values dominate:

$ grep -rhoE '#[0-9a-fA-F]{6}' wp-content/themes/my-theme --include='*.css' | sort | uniq -c | sort -rn

The top few lines are your real palette and the long tail is noise. Repeat the idea in the database for values stored in post content, and inspect computed styles on key pages in the browser’s developer tools.

Mapping. Cluster near-duplicates and map each old value to a role or a step. Merging four almost-identical greys changes a few pixels’ worth of colour, so get sign-off, and keep the mapping from old value to new token in a table.

Staging. Take a database backup, then work on a staging copy.

$ wp db export before-token-migration.sql

Install the framework there, enter the decisions from your planning page, add the alias tier and build the component catalogue first. Take screenshots of key pages before you start, so you can compare after each stage.

Order of work. Start with the shell: base styles, header and footer. Then convert page types that repeat, such as case studies or product pages, before one-off pages. Leave the old CSS loaded until every user of a rule has moved, and delete rules only after that. Keep writing new work on tokens from day one, so the amount of old content only shrinks.

The version question. If the site already runs Automatic.css 3, remember the vendor’s statements that version 4 is not backward compatible and that existing sites should stay on 3.x. Moving from 3 to 4 is a rebuild of the vocabulary, not a plugin update. Weigh it honestly: staying on a supported version while you finish the rest of the project is often the sensible call, and your role-alias tier will make the later move far less painful.

Closing the migration. Finish by switching on the audits, the promotion rule and the decision log, otherwise the site drifts again within months. Keep a rollback path: the backup and the previous settings export.

A migration in seven phases

Phase 1: InventoryCount the colours, sizes and spacings in use, in files and in the database.
Phase 2: MapCluster near-duplicates, map each old value to a role or step, and get sign-off on small visible shifts.
Phase 3: StagingBack up, clone the site, install the framework and enter the decisions.
Phase 4: ShellMove base styles, header and footer first.
Phase 5: TemplatesConvert page types that repeat before one-off pages.
Phase 6: Long tailHandle the remaining pages and delete old rules once their last user is gone.
Phase 7: LockSwitch on the audits and the promotion rule, then release.
Inventory and mapping come before any tool is installed, and the lock phase is what stops the site drifting back.

When a plain CSS token file is enough

A framework is not the only way to have tokens. For a small site, one hand-written stylesheet is often the better system: nothing to license, nothing to update and nothing between you and the CSS. Here is a complete token file for a modest brand, using the same three-tier idea. The values are examples, so replace them and check the contrast of every pair.

:root {
  color-scheme: light dark;

  --ds-action: light-dark(#5B21B6, #A78BFA);
  --ds-action-soft: light-dark(#EDE9FE, #2E1F55);
  --ds-ink: light-dark(#1F1B2E, #F2F0F8);
  --ds-muted: light-dark(#5B5670, #B4AFC7);
  --ds-surface: light-dark(#FFFFFF, #14111F);
  --ds-focus: light-dark(#2563EB, #93C5FD);

  --ds-text-s: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --ds-text-m: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --ds-text-l: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
  --ds-text-xl: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem);

  --ds-space-s: 0.5rem;
  --ds-space-m: 1rem;
  --ds-space-l: clamp(1.5rem, 1.2rem + 1vw, 2.5rem);
  --ds-space-section: clamp(3rem, 2rem + 4vw, 6rem);

  --ds-radius: 0;
}

That is the whole system’s foundation, and everything earlier in this guide still applies to it: roles, scales, aliases, components, documentation and governance. What you give up is the arithmetic. Shades, scales and the dark partner of each colour are now yours to choose and maintain by hand, and there is no dashboard, no settings export and no ready-made recipes. What you gain is transparency, no plugin to break on update and no vocabulary to learn.

If you run a block theme, check what you already have before adding anything. Colour, font size and spacing presets defined in theme.json are emitted as CSS custom properties and appear in the editor’s pickers, so the theme can be your token source, with your alias tier layered on top.

Use the plain file when one site is maintained by one or two people who are comfortable with CSS, with a handful of page types and no need for builder pickers. Move to a framework when the same vocabulary has to repeat across several sites, when non-developers assemble pages in a visual builder, or when hand-maintaining shades and scales starts to hurt. Because the naming here matches the aliases from the naming section, moving up later mostly means pointing the alias tier at a different source. That is the real payoff of the three tiers: the choice of tool becomes reversible.

Plain token file or token framework?

How much of this system do you need a tool to generate?
One site, one or two people, a few page types, comfortable writing CSSA plain CSS token file, or theme.json presets in a block theme, is enough. Keep the three-tier naming.
Several sites sharing one vocabulary, or an agency repeating similar buildsA generator such as Automatic.css earns its dependency, because the work repeats.
Non-developers build pages in a visual builder and need pickersChoose a framework your builder integrates with, and verify that integration in its documentation.
You are not sure yetStart with the plain file, name things in tiers, and move up when maintaining scales by hand starts to hurt.
The deciding factors are how often the work repeats and who builds the pages, not how impressive the tool is.

Checklist

  • Write the brief, the seven decisions and a reason for each before opening any settings screen.
  • Check every text and surface colour pair against the WCAG AA contrast targets.
  • Define colours as roles such as primary, base, status and focus, never by hue.
  • Set the type scale minimum and maximum deliberately and test at 200 per cent zoom.
  • Limit spacing to a named ladder, with section padding as its own token.
  • Choose one radius decision and two or three elevation levels defined by purpose.
  • Create a prefixed alias tier and write fallback values there only, not inside components.
  • Verify every framework variable name against the documentation for your exact installed version.
  • Check the framework layer names and order, and state your own layer order once.
  • Build components from aliases, with variants that change variables and prefixed BEM-style class names.
  • Give every interactive element a visible focus style and a target of at least 24 by 24 CSS pixels.
  • Test dark mode on images, logos, shadows, borders and embeds, and force a dark section to confirm aliases follow the scheme.
  • Build a private component catalogue page showing every variant in light and dark.
  • Export the framework settings and store the file with a dated changelog.
  • Name one system owner and write the promotion rule for new tokens.
  • Run the file and database audits for hard-coded values on a schedule.
  • Measure stylesheet size and unused bytes before and after changes, with a cold and a warm cache.
  • On an existing site, back up, work on staging, and migrate the shell, then templates, then the long tail.

About this guide. This is general guidance written by WPresident Editorial from documentation and widely used practice. WPresident has not benchmarked the products or methods described. Interfaces and plan limits change, so check the vendor’s current documentation before you act. Not legal, tax or financial advice. See our editorial policy.

Frequently asked questions

Is Automatic.css 4 ready for production?

That is the vendor's call, and the answer can change. Version 4 has been distributed as alpha-stage builds, so check the changelog for the current release and its label. If you must ship on it, keep a role-alias tier so renames cost one edit, export your settings regularly and test every update on staging first. Existing sites running version 3 can stay on it, as the vendor advises.

Which page builders work with Automatic.css 4?

The version 4 documentation lists Etch as the flagship integration, with Gutenberg and Bricks Builder also supported, and says several earlier integrations were dropped. Because the output is plain CSS custom properties, any tool that accepts a CSS value can reference them, but the builder-specific features are what the integration list covers. Read the documentation for your builder before you plan around it.

How many tokens should a small design system have?

There is no magic number. A typical small site needs colour roles, a ladder for type and another for spacing, one radius, two or three shadows and a few dozen aliases in total. If the alias list keeps growing, audit it: either roles are overlapping or components are compensating for missing variants. A short list that everyone remembers beats a complete one nobody reads.

Should components use framework variables or my own aliases?

Use aliases for colour, radius and shadow, because those are the decisions most likely to change and most worth insulating. Spacing and type steps are scales, so components can use them directly. The alias tier also gives you a single place for fallback values and a buffer against renames while a framework version is still settling.

Do I need dark mode?

Only if your audience or brand calls for it. If you build tokens with color-scheme and light-dark(), it is cheap to add and also gives you dark sections on light pages. Either way, plan a manual pass for images, logos, shadows and contrast, and check that your browser support policy covers light-dark(). Skipping dark mode is a legitimate decision if you write it down.

What is the difference between a design token and a CSS variable?

A token is the decision: this is our primary action colour. A CSS custom property is one way to store and deliver it to a browser. Tokens can also live in a JSON file, in theme.json or in a design tool, and be turned into CSS later.

Why write fallback values inside var()?

A fallback keeps the page rendering if the framework stylesheet is missing. The costs are a second source of truth that can drift and a typo that never warns you, because a misspelt variable silently uses the fallback. Write fallbacks once, in your alias tier, and check variable names against the documentation or an export instead of trusting the page to look right.

Will a design system slow my site down?

Not by itself. The cost is the generated stylesheet plus whatever you add on top, and fonts, images and scripts usually matter more. Measure rather than assume: compare stylesheet transfer size and unused bytes in the browser developer tools before and after changes, on the same page with a cold and a warm cache.

How do I stop editors from breaking the system?

Reduce the ways a wrong value can get in. Disable custom colour pickers in the block editor, limit custom CSS fields through roles and permissions, provide templates and locked layouts, and run scheduled audits for hard-coded values in files and in the database. Pair that with one system owner who approves new tokens, so the vocabulary has a clear gatekeeper.

Can I build a design system without a framework?

Yes. A hand-written token file, or the presets in a block theme's theme.json, can carry colour roles, fluid type, spacing, radius and shadows. Keep the three-tier naming, add a component catalogue and write down the governance rules, and you have a real system. You can adopt a framework later by pointing your alias tier at its tokens.

Who should own the design system?

One named role with a deputy. On many teams that is a front-end developer, a lead designer or an agency technical lead. The owner approves new tokens and shared components, keeps the documentation and decision log current and runs the audits. Everyone else can propose changes. Shared ownership by committee tends to produce a system that only ever grows.

W
Written byWPresident EditorialThe WPresident editorial team. Every article says whether it comes from hands-on use or from documentation, and anything paid for is labelled.

Keep reading

Get the Monthly Launch Report

One email a month: the best of last month's articles, new reviews and what changed in WordPress, without the noise.

No spam. Unsubscribe in one click.

Signed and sealed,
The WPresident
↑↓ move↵ openEsc closeAll results