Most page-builder sites do not fail on day one. They fail on day ninety, when a third person has added a fourth shade of purple, the card on the services page no longer matches the card on the blog, and nobody can say which of the nine heading styles is the real one. The builder was never the problem. The site had no layers. Every page was styled on its own, so every page drifted on its own.
Etch and Automatic.css (ACSS) are a good pair for fixing that, because between them they give you the layers. ACSS is a CSS framework for WordPress, and it holds the design tokens: the palette, the text scale, the radius, the fonts. Etch is a WordPress builder that stores its output as ordinary blocks made of real HTML elements, real classes and real CSS, and it holds the structure and the component library. Use them in the order tokens first, classes second, components third and pages last, and you can change a brand colour in one place and watch the whole site follow. You can also add a page without inventing a new look.
This guide walks through that order as a tutorial, with a real build as the running example. wpresident.com was built in November 2026 by an AI agent (Claude Code) driving WordPress through NibWP, on WordPress 7.1, with Etch 1.8.3 and Automatic.css 4.0.0-alpha-5 installed. About 45 pages, a single-post template, a shared header and footer, the colour palette and the typography settings were produced that way. Two facts about that build shape everything that follows, so you should have them before you read on.
First, we built through the API, not through the visual canvas. We never used Etch’s visual builder, so this guide says nothing about how the canvas feels, how drag and drop behaves or how its panels are laid out. What it can tell you is how Etch stores things, what the markup and the CSS look like, what a strict validator accepts and rejects, and what broke. That turns out to be most of what decides whether a site stays maintainable, however you author it. Second, Automatic.css 4.0.0-alpha-5 is an alpha. Anything we say about it from experience is about that build. Anything else comes from the vendors’ public documentation and is labelled that way.
NibWP, the plugin that exposed the site to the agent, is made by the same publisher as this website. It appears here only as the route we took, never as a requirement. Everything about Etch and ACSS holds if you build in the canvas, in a code editor or through your own scripts.
The single most important idea in the guide is simple to say and hard to keep: decide what the reusable pieces are before you build any page, and make every value inside them come from a token. A component whose colours are hard-coded is a copy of the problem, not a solution to it. A class whose font size is a one-off number will be wrong the first time the type scale changes. The tokens are the contract between the design and the code, and the components are the contract between the code and the pages.
The guide follows the order we recommend. It starts with how the two products fit together and how to plan pages as sections and components. It then sets up the design tokens, names the classes and writes token use with fallbacks. After that come the shared header and footer, loops for card grids, scripts attached to elements, global CSS with responsive rules, and the post template. The last sections cover performance and caching, then the build order and the failures to expect when a validator checks your output and a host has a bad hour.
Each section stands on its own, but the planning section is worth reading first, because every later choice leans on it. Code samples are short and conservative. Where a name or a syntax comes from documentation rather than from our build, we say so, and you should check it against the current documentation before you paste it into a live site.
Key points
- Build bottom up: ACSS tokens, then the global stylesheet, then classes, then components, then pages, and fix each problem in the lowest layer where it is true.
- Decide what is a component, a loop or just a class before you build any page; the header, the footer and one card are the first three components on almost every site.
- Name classes in a BEM-like way with a brand prefix, give every element a class, and write every colour and font size as a token with a fallback.
- Loops use named presets with parameter defaults, so one card component can serve a home page strip, an archive and a related-posts block.
- Styles print late in wp_head, scripts load as deferred modules and page caches can bypass unknown query strings, so verify output order and cache state rather than assuming them.
- A dry run and a strict validator catch many mistakes before a page goes live, but not all of them, so plan for retries, expired sessions, noisy warnings and text-escaping surprises.
- ACSS 4.0.0-alpha-5 is an alpha and we built through the API, not the visual canvas, so check names and behaviour against the current documentation.
What we built, and how far each claim can be trusted
wpresident.com is the working example for the whole guide, so it helps to be precise about what it is. It was built in November 2026 on WordPress 7.1 by an AI agent, Claude Code, which drove the site through NibWP instead of through wp-admin. The plugin list on the day we wrote this included Etch 1.8.3, Automatic.css 4.0.0-alpha-5, ACF PRO, Slim SEO, xSpeed Cache and FluentCRM. The theme was TT25, used as a blank canvas that a small custom plugin renders the content into. The agent produced about 45 pages, a single-post template, a shared header and a shared footer, SEO titles and descriptions, a colour palette, the typography settings and several small sandbox plugins, mostly from scripts.
That route has a consequence for this guide: we never opened the Etch visual builder. Every class, element and component went in as data. We can therefore describe how Etch stores a page, how a class carries its CSS, how a loop preset is shaped, how a script attribute prints and what a strict validator says about a payload. We cannot describe the canvas, meaning its panels, its inspector or how fast it feels to a human. If you build visually, treat the canvas as another way of producing the same stored result, and use this guide to judge what that result should look like.
Every statement in the guide falls into one of three groups, and you should be able to tell which. Statements written as “we used”, “we built” or “we hit” are first-hand and come from that build. Statements introduced by “the documentation says” come from public vendor documentation, and we did not verify them on the site. Plain advice, such as why a component should have a stable contract, is general practice and our editorial judgement.
Two caveats apply to everything. Automatic.css 4.0.0-alpha-5 is an alpha build, so variable names, defaults and dashboard options can change before a stable release. And Etch moves quickly. Before you copy anything, open the current documentation for both and check the names that matter to you: the token names, the loop syntax and the way a script attribute is declared.
It also helps to know what the public pages say about each product, because the pitch and the practice are different things. The Etch product page shows loop syntax, dynamic keys and component tags in the same style used in this guide. The ACSS documentation describes version 4 as aligned with Etch and says no manual setup is needed when the two are used together. Because we never used the canvas, we cannot say what that integration feels like from inside it.
Finally, a note on scope. This is a build guide, not a review. It does not tell you whether to buy either product, what they cost or how they compare with other builders. Our separate reviews cover that. Here the question is narrower: given that you have chosen this pair, in what order should you work, what should each layer contain, and what goes wrong.

How Etch and Automatic.css fit together: six layers
It is easiest to understand the pair as a stack in which each layer reads from the one below it. When something looks wrong on a page, the fix almost always belongs in the lowest layer where the problem is true, and the stack tells you where that is.
At the bottom are the ACSS settings, the values you enter in the framework’s dashboard. You give it brand colours as hex and it converts them to the OKLCH colour space and generates a scale of shades for each colour role. The ACSS documentation lists the roles as primary, secondary, tertiary, accent, base and neutral, with warning, info, success and danger kept apart as status colours. In our build the computed colours did come out in oklch. Above the settings sits the framework’s output: CSS custom properties such as –primary and –primary-ultra-light, a text scale that starts at –text-xs, and utility classes. The documentation for version 4 also says the framework now uses CSS cascade layers, which matters when your own rules meet the framework’s. A later section covers that.
Above the variables sits the global stylesheet. In Etch this is one piece of CSS stored in an option, and it is the place for things that are true of the whole site: box-sizing, link behaviour, the page-width wrapper, focus outlines. Above that are the classes. Etch stores each class with its CSS as a separate style entity, so a class is a small unit that owns its rules. Nesting works, so a hover state or a media query lives inside the class it modifies. Etch’s documentation describes this as element-based CSS: styling belongs to the element, and only the styles for elements actually on the page are output.
Components come next. A component in Etch is a reusable block of structure that pages reference instead of copy. We saw them stored as wp_block posts, and a page includes one through an etch/component block. That is how one header and one footer reached every page. At the top are the pages and templates, stored in post_content as blocks: etch/element for HTML elements, etch/text for text, etch/component, etch/loop for repeated data, etch/condition for conditional output and a few more.
One property of this design is easy to miss, so it is worth stating plainly: the output has no wrappers you did not author. The markup we saw was clean, with no extra div around an element unless we put it there. That makes the stack honest. What you wrote is what the browser receives, so a layout bug is a bug in your classes, not in a hidden container.
Read the stack as a set of rules. A colour changes at the bottom. A spacing rhythm changes in the variables or the global stylesheet. A card’s padding changes in the card’s class. A header link changes in the header component. A page changes only when its own content changes. If you find yourself editing forty pages to change a brand colour, a value was written in the wrong layer. The remaining sections go through the layers in the order we would build them.
Six layers, read from the top down
Plan the pages as sections and components first
The cheapest hour of the whole project is the one you spend with a text file before you open anything. List your page types, not your pages. A site like ours, with roughly 45 pages plus one template for every article, reduces to a handful of types, for example a home page, landing pages, standalone informational pages and long-form posts. Within each type, list the sections from top to bottom using plain names such as hero, proof strip, card grid, FAQ and call to action. Then look down the lists for anything that repeats.
Repetition comes in three kinds, and each deserves a different tool. The first is an identical block that appears everywhere: the header, the footer, a newsletter strip. That is a component with no moving parts. The second is the same structure with different content, such as a card that shows a title, an image and a short description. That is a component fed by dynamic data, usually inside a loop. The third is the same look with different structure: section wrappers, buttons, headings, lists with a consistent rhythm. That is not a component at all. It is a class, or a small set of classes, because the children of a section wrapper differ from page to page, and forcing them into one component only produces a component with twenty options.
This distinction is where most builder projects go wrong, usually in the direction of too many components. A component is a contract. It promises a stable structure, and everything that includes it inherits any change. That is a strength when the change is a fix to the footer, and a liability when the change breaks a layout on a page you did not open. A sound rule of thumb is to promote something to a component only when it appears in three or more places, or when it is page chrome that must be identical everywhere. Everything else stayed as plain elements with shared classes until the repetition proved itself.
Plan the class vocabulary at the same time. For each section and component, write down the block name and the elements inside it. A card becomes a block with media, a title and a description. A hero becomes a block with a heading, a lede and an actions row. This list is the skeleton of your CSS, and if you make it before you build, the naming section later in this guide is only a matter of writing down what you already decided.
Finally, decide the data sources now. Anything that will come from WordPress content, such as the latest posts, the posts in one department or a related-posts block, needs a loop preset and a decision about which fields the card shows. If a card needs a field that WordPress does not hold natively, such as a badge or an accent colour per department, decide whether it becomes a custom field. We used ACF PRO for the site’s ad manager, and separately added custom fields to loop items through a filter, which a later section covers. Making those decisions at planning time costs nothing. Making them after forty pages exist means a bulk edit.
Should this block be a component?
Set up the design tokens in Automatic.css
Tokens are decisions you only want to make once: the palette, the text scale, the spacing rhythm, the corner radius, the fonts and the focus style. Make them before you write a single class, because every class you write afterwards reads from them. In our build we applied a palette and the settings through NibWP’s ACSS tools instead of the framework’s dashboard.
The tokens we actually used were –primary, –primary-ultra-light, –neutral-semi-dark, –neutral-ultra-dark, –base, the text scale from –text-xs to –text-xl, and –focus-color. We set the radius to 0, which gives the whole site square corners from a single value, and we set the heading and body font families. The computed colours came out in oklch. We cannot tell you more about the palette generator from experience, because we supplied the colours and used what came out.
The ACSS documentation adds useful context. You enter colours as hex, and the framework converts them to OKLCH and builds a scale of shades for each role you enable: ultra-light, light, semi-light, semi-dark, dark and ultra-dark, plus a hover shade. It says you should enable only the roles you need, and that version 4 no longer ships transparency tokens, so translucent colours are made with color-mix() or relative colour syntax. It also notes that the largest text size is renamed from XXL to 2XL in version 4. Keep your palette small. Primary, base and neutral cover most sites, and every extra role is another thing to keep consistent.
One caution about generated shades. OKLCH makes lightness steps look even to the eye, which is a real advantage, but even steps are not the same thing as a contrast ratio. A readable pair in one part of the scale can fail in another. Check the pairs you will actually use, such as body text on base, white text on primary, and link colour on a tinted background, with a contrast checker before you build components around them.
The radius deserves its own thought. A single radius token decides much of a site’s character, and changing it later is a one-line edit only if every class reads from the token. The same goes for fonts. Set the heading and body families in the framework, load the font files properly on the site, and limit yourself to two families, so the text scale is the only thing varying.
After you apply the settings, verify them in a browser. Open the console on any page and read the computed values, which tells you the variables exist on the front end and are not just saved in a dashboard.
const root = getComputedStyle(document.documentElement);
['--primary', '--primary-ultra-light', '--neutral-ultra-dark', '--base', '--text-xs', '--text-xl'].forEach(function (name) {
console.log(name, root.getPropertyValue(name).trim());
});
Any name that prints an empty string is missing, which is worth knowing before a hundred rules depend on it. ACSS is not the only way to supply tokens. Core Framework, shown below, is another WordPress CSS framework that describes itself as open source and portable between builders. We have not used it and this guide does not compare the two. The method is identical whichever you choose: decide the tokens once, and let everything else read them.

Name things: BEM-like classes with a brand prefix
In Etch a class is more than a label. It is a style entity that carries its own CSS, which makes the class name the unit of maintenance for your whole design. Two rules from our build made that concrete. The validator wanted class names that were BEM-like and carried a brand prefix. And it wanted every element to have a class, with SVG primitives as the only exemption. Both turned out to be good habits, whether or not a validator enforces them.
BEM stands for block, element, modifier. The block is the component or section, the element is a part of it, and the modifier is a variant. With a brand prefix, a card looks like this: acme-card for the block, acme-card__media and acme-card__title for the elements, and acme-card–featured for a variant. This guide uses acme as a stand-in. Pick two to four lowercase letters that identify your brand and use them on everything you write.
The prefix does real work. Plugins and frameworks define generic class names such as card, button and container, and an unprefixed class of yours will collide with one of them eventually. There is a second reason specific to this pairing. The ACSS documentation shows utility classes written with a double dash, for example bg–ultra-dark and width–60, which looks exactly like a BEM modifier. A prefix tells you at a glance which classes are yours and which belong to the framework.
Keep element names flat. A title inside a card is acme-card__title, not acme-card__body__title, even when the markup nests three levels deep. The name records the role, not the position, and a flat name survives a markup refactor. Name elements for what they are, such as media, title, meta and actions, not for how they look, such as left or big. A modifier then changes a block’s look without renaming anything: acme-section–tint, acme-card–featured, acme-button–ghost.
Giving every element a class, even a plain wrapper, feels excessive until you look at the alternative. An element without a class can only be styled by tag or position, such as the second div inside the first section. Those selectors break the moment someone inserts an element above. With a class on everything, the stored CSS maps one to one onto the markup, and you can search the style entities for any name and find every rule that touches it.
A last rule: do not drive state with classes your scripts toggle when an attribute will do. If a dropdown is open, aria-expanded already says so, and your CSS can select on that attribute. The script stays smaller, assistive technology gets correct information for free, and there is one source of truth for the state instead of two that can disagree. The scripts section returns to this.
Class naming: fragile versus maintainable
| Fragile | Maintainable | |
|---|---|---|
| Names | card, title, big | acme-card, acme-card__title, acme-card–featured |
| Collisions | Clash with plugin and framework classes | The prefix keeps your CSS apart from both |
| Elements | Some have no class and are styled by position | Every element has a class |
| Variants | Copy the class and edit the copy | Add a modifier to the block |
| Depth | card__body__title mirrors the markup | Flat names that record the role |
| State | A script toggles an is-open class | aria-expanded drives the style |
Write every token use with a fallback
The pattern we followed everywhere is a custom property with a plain fallback: var(–primary, #5B21B6), not a bare var(–primary). If the framework’s output is missing, delayed or renamed, the page still renders in sensible colours instead of collapsing to browser defaults. In an alpha framework that is cheap insurance, and it also makes each pushed page self-describing, because you can read the intended value in the CSS.
A validator made this a rule, and the rules are worth knowing because they are strict in particular ways. Colours had to be tokens with a fallback, and a hard-coded hex used on its own was flagged. A fallback written as rgba() inside a var() failed, so the fallback had to be a plain colour. Font sizes had to use a token style, and clamp() or complex min() fallbacks were rejected. In practice that means the fallback is a simple value you could read aloud: a hex colour, or a rem length.
.acme-card {
background: var(--base, #FFFFFF);
color: var(--neutral-ultra-dark, #1F1B2E);
border: 1px solid var(--neutral-semi-dark, #6B6580);
padding: var(--space-l, 1.5rem);
&:hover {
border-color: var(--primary, #5B21B6);
}
}
.acme-card__title {
color: var(--primary, #5B21B6);
font-size: var(--text-xl, 1.5rem);
}
Two notes on that sample. The nested hover rule uses CSS nesting, which worked in Etch. The spacing token name follows the pattern visible in Etch’s own examples, and you should confirm the exact spacing names in the ACSS documentation before you rely on them, since they are not among the tokens we used from experience.
Translucent colours need a decision. The ACSS documentation says version 4 dropped its transparency tokens in favour of color-mix() and relative colour syntax. Because an rgba() fallback failed our validator, we would not put a translucent colour in a fallback. Define the translucent variant once, as your own prefixed custom property in the global stylesheet, give it a plain fallback where you use it, and run a dry run to see whether your validator accepts the form. We did not verify how a validator treats color-mix() in each position, so test it before you commit to a pattern across forty pages.
You should also know where we fell short. Many of our pages still used our own prefixed variables rather than ACSS tokens. Only the header, the footer and some components adopted the ACSS tokens fully. The result renders correctly, but a palette change in ACSS does not reach every page, which defeats the purpose of having a token layer. The middle path we would take next time is to alias once in the global stylesheet, for example –acme-accent set to var(–primary, #5B21B6), and have every class read the alias. The alias then follows the framework, and you still have one place to rename.
Fluid type is the last thing to settle. We did not verify how the ACSS 4 text scale behaves between breakpoints, so read its documentation. If the scale is fluid, as ACSS has long been, a validator rejecting your own clamp() costs you nothing: let the scale supply the fluidity and use the token for each size.
Build the header and footer as shared components
Build the header and the footer before any page, because every page inherits them and every later page will be judged against them. In our build both were components stored as wp_block posts and referenced from every page, which is how one header and one footer reached about 45 pages. Editing the component once changed them everywhere, and that single property is the strongest argument for the component approach in this whole guide.
Start with the semantics. The header is a real header element with a navigation landmark inside it, labelled so a screen reader can tell it apart from a footer navigation. The first focusable element should be a skip link that jumps to the main content. Give the logo link a text alternative, and make sure the focus style is visible. The –focus-color token is the natural source for the outline, so the ring follows the palette, and it still has to be checked against the background it sits on.
Next, keep the structure boring. A wrapper that centres the content at your page width, a brand block, a navigation list, an actions area. Every element gets a prefixed class, so the header’s CSS lives under names such as acme-header, acme-header__brand and acme-nav__link. Decide early whether the links are typed into the component or generated from elsewhere. Typed links are the simplest option and perfectly reasonable on a site with a stable structure, with the cost that every new section means a component edit. Whichever you choose, write it down, because a future editor will ask.
The header also carried behaviour. Its search palette came from a script attached to an element, the same mechanism we used for a slider and a dropdown, and the scripts section covers it. The pattern to adopt here is that the component carries its own behaviour. The page never needs to know that the header has a search box.
A component is a contract, so resist page-specific variants. If a header should be transparent over a hero on the home page, make that a modifier decided by the template or the page, not a second header component that will drift from the first. If a footer needs a different call to action in one department, that is content for a slot or a loop, not a fork. Every fork doubles the places a fix must be applied, and the point of having a component is to have one.
When you change a component, verify across page types, not on the page you happened to open. Load one page of each type after the edit: a home page, a landing page, a long post. Check the header at a narrow width and with the keyboard. If a page cache sits in front of the site, confirm you are looking at the new version and not a stored one. The performance section shows how to check that.
Finally, keep the content of shared components stable. Anything that changes often, such as a banner or a campaign link, belongs in data that the component reads, not in markup that someone edits. A footer that has to be republished for every promotion gets neglected, and a neglected footer is how a site ends up showing last year’s offer on every page.
Loops and dynamic data for card grids
A card grid is the most common repeated block on a content site, and in Etch it is a loop around a card. The Etch documentation describes loops as a Loop element that takes a data source, with WP Query, JSON, WP Terms and WP Users listed as the sources. Inside the loop, each item is available under the name you give it, so a title is written as {item.title} and a link target as {item.permalink.relative}. A second name after the item gives you a zero-based index. On the Etch product page the same syntax appears as {#loop posts as post}.
Written as text, a loop looks like the sample below. This is the documentation’s form, shown for orientation. In our build the loop was stored as etch/loop and etch/element blocks, not as this text, so treat it as a picture of the structure.
{#loop latestPosts as item}
<article class="acme-card">
<h3 class="acme-card__title">{item.title}</h3>
<a class="acme-card__link" href="{item.permalink.relative}">Read {item.title}</a>
</article>
{/loop}
What we did beyond the basics was use presets. Etch keeps named loop presets in an option called etch_loops. A preset holds the query arguments, and it accepts parameters with defaults, written in the form $limit ?? 6, meaning use the passed limit or fall back to six. That one feature changes how you plan: instead of a different query on every page, you define a few presets, such as latest posts, posts in one department and related posts, and each page supplies only the parameters that differ. The card component stays untouched.
The loop item exposes {item.title}, and for custom fields {item.meta.key}, where key is the meta key. We also added our own fields to the loop item with the etch/dynamic_data/post filter, which is how extra fields reached the loop item. We are describing that from experience in general terms only. Check the Etch documentation for the filter’s current signature before you write code against it.
A few rules keep loops healthy. Give every preset a purpose-built name and a small set of parameters with sensible defaults. Keep the limit low and the card light, because every loop is a database query on an uncached page. Think twice before nesting loops, which the documentation says is supported, since the cost multiplies. Decide what the empty state is, because a loop over zero posts renders nothing, and an empty grid under a heading looks broken. The documentation also shows a workaround for empty states that uses an inline loop over a one-item array. Check it in the current documentation before relying on it.
Last, remember what a loop does to caching. The grid is built when the page is rendered, so a page cache will keep showing the old list until it is purged. We used ACF PRO’s acf/save_post hook to purge the page cache when the ad manager changed, and the same idea applies to any list that must update promptly.
From loop block to repeated cards
- Loop block on the pageNames a preset and passes only the parameters that differ.
- Preset resolvedRead from the etch_loops option; missing parameters take their defaults.
- Query runsThe preset arguments fetch the posts.
- Item data builtTitle, meta keys and any fields added by the etch/dynamic_data/post filter.
- Card repeatsOne copy of the card markup per item, with the keys filled in.
- Cache stores the pageA new post appears only after the cache is purged or expires.
Attach scripts to elements, not to the page
Etch lets an element carry a script. In our build the attribute was an id plus the code encoded as base64, and it printed as a deferred module script in the head. We used it for three things: the header search palette, a slider and a dropdown. The attraction is locality. The behaviour travels with the element and its component, so a page that includes the header gets the header’s script and nothing has to be enqueued by hand.
The delivery details shape how you write the code. A module script has its own scope, so your variables are not global and cannot leak or collide. It is deferred, so by the time it runs the document has been parsed and your selectors can find elements. It prints once per script, so do not rely on it running again after the DOM changes. Because we did not check whether a script prints on a page that lacks its element, write every script so it exits quietly when its elements are not found.
const toggles = document.querySelectorAll('.acme-nav__toggle');
toggles.forEach(function (toggle) {
const panel = document.getElementById(toggle.getAttribute('aria-controls'));
if (!panel) return;
toggle.addEventListener('click', function () {
const open = toggle.getAttribute('aria-expanded') === 'true';
toggle.setAttribute('aria-expanded', String(!open));
panel.hidden = open;
});
document.addEventListener('keydown', function (event) {
if (event.key === 'Escape' && toggle.getAttribute('aria-expanded') === 'true') {
toggle.setAttribute('aria-expanded', 'false');
panel.hidden = true;
toggle.focus();
}
});
});
That dropdown finds its elements by class and ARIA relationships, not by position, so a markup change does not break it. It keeps its state in aria-expanded, which is what the CSS reads, and it closes on Escape and returns focus to the button. Those three habits cover most accessibility failures in small widgets. A search palette needs more: a dialog role, a way in and out by keyboard, and focus kept inside while it is open.
Because the stored script is base64, never edit the encoded text. Keep the real source in a file under version control and encode it when you push. With Node installed, one command prints the encoded form of a file.
$ node -e "process.stdout.write(Buffer.from(require('fs').readFileSync('nav.js')).toString('base64'))"
Finally, build the page so it still works when the script does not. Links in the dropdown should be reachable some other way, the slider should be a scrollable row before it becomes a slider, and the search box should work as a plain link to the search page. A script is an enhancement. If the header cannot function without it, the failure is yours, not the visitor’s.
Global CSS, cascade layers and responsive rules
Etch keeps one global stylesheet, stored in an option, and the discipline is to keep it short and about the site rather than about any component. Good candidates are box-sizing, the page-width wrapper, link underlines, the focus outline, a reduced-motion rule and the alias variables from the token section. A component rule that ends up there is a rule in the wrong layer, and it will be the one that surprises you in six months.
The ACSS documentation says version 4 uses CSS cascade layers, so the framework’s rules sit in layers. The CSS rule that matters is that unlayered styles beat layered styles regardless of specificity. We did not inspect how Etch prints class CSS relative to the framework’s layers, so do not assume. Open the browser’s style inspector on a rule that is not winning, and look at the layer name shown beside it. If both sides are unlayered, ordinary specificity and source order apply. If the framework is layered and yours is not, you win by default, which is usually what you want.
For responsive work, nesting is the convenient part. We found that nested rules such as &:hover and nested @media blocks worked inside class CSS, so a class keeps its breakpoints next to its base rules. The ACSS documentation says version 4 removed its breakpoint presets, so you choose your own. Choose two, write them in rem, go mobile-first with min-width, and let layout do the rest. A grid with auto-fit columns needs no breakpoint at all.
.acme-grid {
display: grid;
gap: var(--space-l, 1.5rem);
grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}
.acme-hero__actions {
display: flex;
flex-wrap: wrap;
gap: var(--space-l, 1.5rem);
@media (min-width: 48rem) {
justify-content: flex-start;
}
}
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0.01ms !important;
transition-duration: 0.01ms !important;
}
}
Test the result at the narrowest width you support, at 200 percent zoom and with long words in headings, since those find overflow quickly. Avoid fixed heights on anything that holds text. If the header is sticky, anchor links will land underneath it, so give targets a scroll-margin-top. The ACSS documentation describes header height and scroll offsets as settings of the framework, which is worth reading before you hand-roll it.
The figure below sums up where each kind of rule belongs. The rule of thumb behind it is that a value should be written at the highest layer that is still true for everything using it.
Where a rule belongs
| Put it here | Keep it out of here | |
|---|---|---|
| ACSS settings | Palette, text scale, radius and fonts | One-off tweaks for a single card |
| Global stylesheet | Box-sizing, wrappers, links, focus, reduced motion | Anything that names a component |
| Class CSS | A block layout, spacing and states, with media queries nested | Colours that are not tokens |
| Component | Structure shared by every page | Page-specific variants |
| Element script | Behaviour that needs JavaScript | State that an ARIA attribute can drive |
The post template: one layout for every article
Long-form content wants one template, not one layout per post. We built a single-post template that every article uses, with the post’s own data filling it in. In Etch’s terms that means a template whose elements read dynamic data for the current post, so the title, excerpt, featured image and date are keys, not typed text. The Etch documentation lists the available keys, and you should check that list for the exact names before you build, since we are not going to guess at spelling here.
Plan the template as a short stack of sections. A header band with the department label, the title, the excerpt and the meta line. The featured image. A key-points block. The body, which is the post content rendered as it was written. A related-posts section, which is a loop using a preset with the current department as its parameter. And a newsletter strip, which suits a shared component. On our site the newsletter form posts to a small custom handler that creates or updates a FluentCRM contact with the status pending, adds it to a list and sends the double opt-in email. That narrow use is all we can speak to.
The most instructive problem we hit here was about order. Etch registers a class’s styles while the blocks that use it render, and it prints them late in wp_head. On a normal block theme this just works. Our theme was TT25 used as a blank canvas, with a small custom plugin rendering the front end, and in that arrangement the page styles went missing. The fix was to render the content before wp_head runs, so the styles are registered by the time the head prints. If you bypass the usual template loading in any way, expect to meet this, and if your page renders unstyled, check the order first.
On the search side, the template needs very little. Slim SEO printed canonical, Open Graph and the sitemap on its own, and the featured image was used as og:image, so setting a featured image on every post was the only template-level duty. We set SEO titles and descriptions per post through NibWP’s Slim SEO abilities. For FAQ schema we wrote our own FAQPage JSON-LD on posts instead of relying on the schema add-on. Write structured data from the same source as the visible FAQ, so the two cannot disagree.
URLs deserve a warning. Slim SEO has an option to remove the category base from category URLs. In our build it made /ai/ resolve as a category archive instead of our /ai/ page. We turned the option off and flushed the rewrite rules, and the page came back. When a template or a page behaves as if it were another one, look for a rewrite collision before you suspect the builder.
Render order that kept the page styles
- Request reaches the canvasThe small plugin that stands in for a theme takes over the front end.
- Render the post content firstEtch registers each class and its CSS as its blocks render.
- Run wp_headThe collected styles and scripts print late in the head.
- Output the head, then the contentThe head goes out first and the stored content follows it.
- Run wp_footerClosing scripts and any footer output.
Performance and caching: what to verify
Start with what Etch gives you for free. The markup we saw was clean, with no wrapper elements we had not written. The documentation says styling is output only for elements that are on the page. Scripts printed as deferred module scripts, so they did not block rendering. The ACSS documentation says version 4 is lighter than version 3 because it dropped deprecated features and most utility class modules. Those are good foundations. We have no timing figures to quote, because we did not run controlled benchmarks, and we will not invent any.
What we can describe is how a page cache behaved. xSpeed Cache 1.4.8 was on the site with its defaults. Responses carried an x-xspeed-cache header that read MISS on the first request and HIT (nginx) on a repeat, plus an x-xspeed-edge-hold header. The headers a browser sees, cache-control: private, no-cache, s-maxage=0 and cdn-cache-control: no-store, looked like a page that was not cached at all, but the page itself was being cached on the server. Read the plugin’s own header, not the browser-facing one, to find out whether you are being served from cache.
Two behaviours made testing easy. A request with an unknown query string, for which we used a random ?wprnc= parameter, bypassed the cache and always came back MISS, which gives you a reliable uncached baseline. HEAD requests also bypassed it. That second point catches people out, because curl with the -I flag sends a HEAD request, so it will report a miss on a page that is cached for real visitors. Use a normal GET and print the headers instead.
$ curl -s -D - -o /dev/null "$PAGE_URL" | grep -i x-xspeed-cache
$ curl -s -D - -o /dev/null "$PAGE_URL?wprnc=$RANDOM" | grep -i x-xspeed-cache
Set PAGE_URL to the full address of the page you are checking. The header name belongs to xSpeed Cache, and other caching plugins use different ones, so look at the response headers and find yours. Uncached pages were noticeably slower than cached ones when the server was busy, which is why it matters that your key pages are served from cache, but that is an observation, not a measurement.
Caching has a second half that is easy to forget: freshness. A cached page that contains a loop will keep showing the old list after you publish a post. We never needed to purge manually during the build, but we cannot say the plugin’s purge rules are complete, so test the cases that matter to you. Publish a post, then load the home page and the department page. For data that changes outside normal post saves, hook a purge to the save event. We did that with ACF PRO’s acf/save_post for the ad manager.
Beyond the cache, the usual rules apply: size images, give them dimensions, load one font file well instead of three badly, and keep element scripts small. Those are general practice, and your own measurements, taken with the tools you trust, should decide what is worth fixing.
Confirm that a page is served from cache
- Request the page with GETThe first response is often a MISS while the cache is cold.
- Repeat the same requestExpect HIT in the plugin header. If not, find out why before tuning anything else.
- Add a random query stringIt bypasses the cache and gives an uncached baseline to compare against.
- Publish or edit contentChange something that a loop or template displays.
- Request again and read the pageOld content means the purge rules or your purge hook need work.
Build order, dry runs and the failure modes to expect
If you remember one thing about order, make it this: nothing above a layer should be built before the layer is verified. Tokens first, read back on the front end. Then the global stylesheet and class vocabulary. Then the header and footer, checked on three page types. Then the card and its loop presets. Only then pages, one per type, before you replicate anything in bulk. The timeline below is the sequence we recommend.
Our pipeline had a validator with a dry run, and we recommend that shape whatever tool you use. The converter took a payload of Etch blocks plus styles, and a dry_run flag validated it without writing anything. The response listed passed and failed checks, warnings, and what it called orchestration suggestions. Failed checks had to be fixed. Warnings deserved a read. The suggestions were another matter: they were numerous, 89 on one page, and we found no way to silence them, so we suggest skimming them. A real push needed a preflight token tied to the target post and a push mode, and we used replace_section.
These are the failures we actually hit, and how to recognise them.
- Lost text. The converter’s save step treated a dollar sign followed by digits as a back-reference, so a price such as one hundred dollars was stored as the digit zero. Every price on one page disappeared until we noticed. The workaround was to put the dollar sign in its own text block. Compare the rendered page with the source text after every push.
- Double-encoded entities. Etch escapes text content itself, and when we escaped text first we got & on the page. Send plain text and let Etch do the escaping.
- Expired sessions. Calls need a session id from initialize, and sessions expired now and then with errors such as Session not found or Missing Mcp-Session-Id. We re-initialised, and sometimes used a small script client instead of the chat client’s connector.
- Slow or failing calls. A full page push took roughly 10 to 30 seconds. When the host struggled, calls timed out, and one run returned Error establishing a database connection. That was a host problem, but it taught us to build in retries.
- Sandbox crashes. PHP files could only be written under wp-content/nibwp-sandbox/, and a fatal in any of them created a .crashed marker that disabled every sandbox plugin. A stray apostrophe inside a PHP string did it once. The custom canvas vanished until we fixed the file and deleted the marker.
One safety note belongs here. The ability to run arbitrary PHP is powerful and risky, and the site owner told us to stop using it. We finished with the narrower abilities and sandbox files. If you drive a site this way, work on staging, use a dedicated least-privilege user, keep backups and read what the agent plans to run before it runs.
A build order that holds up
Checklist
- Note the exact Etch and Automatic.css versions you are building on, and re-check variable names if either is an alpha or beta build.
- Write the page-type and section inventory, and mark every repeated block as a component, a loop card or a plain class.
- Enter the palette, text scale, radius and fonts in ACSS, then read the computed variables in the browser console on the front end.
- Check contrast for every text and background pair you plan to use, including white on primary and links on tinted backgrounds.
- Choose a brand prefix of two to four letters and name every class in block__element–modifier form.
- Give every element a class, with SVG primitives as the only exception.
- Write every colour as a token with a plain fallback, and every font size as a token with a simple length fallback.
- Alias the tokens you use most once in the global stylesheet instead of mixing your own variables with framework ones.
- Build the header and footer components first and test them on one page of each type, including keyboard navigation.
- Create loop presets with purpose-built names and parameter defaults, and decide the empty state for each one.
- Keep the source of every element script in version control, encode it only when you push, and make it exit quietly when its elements are missing.
- Drive widget state from ARIA attributes such as aria-expanded, and make Escape close the widget and return focus to its trigger.
- Keep the global stylesheet to site-wide rules, and inspect the layer shown in the browser whenever a rule does not win.
- In any custom front-end canvas, render the post content before wp_head runs, and confirm the page styles print.
- Check cache state with a GET request and a random query string, not a HEAD request, and confirm that new content appears after you publish.
- Run a dry run on every payload: fix failed checks, read warnings, and skim suggestions.
- After each push, compare the rendered text with the source, especially currency amounts, and send plain text so Etch does the escaping.
- Work on staging with a least-privilege user and a fresh backup, and build retries into any script for expired sessions and timeouts.
Read this next
About this guide. Parts of this guide come from building and running wpresident.com; those parts are marked as such, and everything else is documentation-level guidance. 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
Do I need Automatic.css to build a site with Etch?
No. Etch accepts ordinary CSS, so tokens could come from your own stylesheet or another framework. The ACSS documentation describes Etch as the builder version 4 is aligned with, and says the two need no manual setup together. We built with both, so we cannot tell you what a build without ACSS is like. The method in this guide, tokens first and classes second, applies either way. Only the variable names change.
Can I follow this guide if I use the visual canvas?
Yes, with a caveat. We built through the API and never used the canvas, so we cannot describe its panels, its inspector or its speed. The stored result is the same kind of thing either way: blocks in post_content, classes with their CSS, components as wp_block posts, loop presets in an option. Use the guide to judge what that result should look like, and the Etch documentation for how to produce it in the canvas.
Is Automatic.css 4 stable enough for a real site?
In our build it was 4.0.0-alpha-5, an alpha, and the site runs on it. We reduced the risk by writing every token use with a fallback, so a page still renders if the framework output is missing. Whether that is acceptable depends on your tolerance for variable names or defaults changing. Check the current release status before you decide, and re-read the changelog before any update.
What class naming convention should I use?
A BEM-like one with a short brand prefix: acme-card for a block, acme-card__title for an element, acme-card--featured for a variant. The prefix prevents collisions with plugin and framework classes, and ACSS utilities such as bg--ultra-dark use a double dash that looks like a modifier. Keep element names flat, name them for their role, and give every element a class. Our validator enforced the BEM-like form and the prefix.
Why put a fallback in every var() call?
So the page still looks right if the framework output is missing, late or renamed. We wrote tokens as var(--primary, #5B21B6), a custom property with a plain fallback. It also makes each pushed page self-describing. Our validator required it for colours and rejected rgba() inside the fallback, and it wanted font sizes to use a token with a simple fallback, not clamp() or a complex min().
When should something be a component, and when only a class?
Use a component for an identical block that appears everywhere, such as a header or footer, and for the same structure with different content, such as a card. Use classes when the look repeats but the structure differs, such as section wrappers and buttons. A block that appears once should stay plain elements until it repeats a third time. A component is a contract, and every page that includes it inherits any change you make.
How do loop presets help?
A preset stores query arguments under a name and accepts parameters with defaults, written like $limit ?? 6. Pages then pass only what differs, and the card component stays untouched. In our build presets lived in the etch_loops option. You define a few, such as latest posts, posts in a department and related posts, and reuse them across the site instead of writing a new query on each page.
How do I show a custom field in a loop card?
A loop item exposes {item.meta.key} for post meta, where key is the meta key. For values that are not plain meta, we added fields to the loop item with the etch/dynamic_data/post filter. We used that filter, but we describe it only in general terms, so check the Etch documentation for its signature. The documentation also has pages on ACF repeater and relationship fields if your data is already there.
Why are my page styles missing in a custom front end?
Etch registers a class's styles while its blocks render and prints them late in wp_head. If your code outputs the head before it renders the content, the styles have nothing to print. We hit this in a custom canvas and fixed it by rendering the content before wp_head runs. If a page shows unstyled markup, check that order before you suspect the CSS.
How can I tell whether a page is cached?
Read the cache plugin's own response header, not the browser-facing cache-control header. On the site we used, x-xspeed-cache showed MISS then HIT (nginx), even though the browser saw private, no-cache headers. Use a normal GET, because HEAD requests bypassed the cache, and use a random query string to force an uncached baseline. Header names differ by plugin, so look at your own responses.
Is it safe to let an AI agent build the site?
It can be done carefully, but it is not risk-free. The ability to run arbitrary PHP is powerful and risky, and our site owner told us to stop using it, so we finished with narrower abilities and sandbox files. Work on staging, use a dedicated least-privilege user, keep backups and read what the agent plans to run. A validator with a dry run helps, but it does not replace review.
Why did text with a dollar sign lose its digits?
In the converter version we used, the save step treated a dollar sign followed by digits as a back-reference, so an amount such as one hundred dollars was stored as the digit zero. It cost us every price on one page until we noticed. The workaround was to put the dollar sign in its own text block. The practical lesson is to compare the rendered page with your source text after every push.



