Styling
Colour, type, spacing and fonts — where a template's design system lives now that it is CSS rather than configuration.
What it is
A template's visual system is written in CSS. Tokens are Tailwind v4 @theme
declarations, fonts are @font-face rules, and everything else is plain CSS and
utilities. There is no theme object and no configuration file.
/* globals.css — the entry, the first stylesheet template.ts imports */
@import "tailwindcss";
@import "@homepages/concrete/styles.css";
@theme {
--color-ink: #171717;
--color-background: #ffffff;
--font-display: "Canela", serif;
}A token named --color-ink yields the text-ink utility, --font-display yields
font-display, and so on. What compiles into the one stylesheet your template
ships is every .css file reachable by import from template.ts.
Why it works this way
Designing in a configuration object means learning a second, smaller language that can express less than CSS and has to be extended every time you need something it did not anticipate. Tailwind v4 moved its own configuration into the stylesheet for that reason, and a framework that layered its own schema back on top would have put the wall back up.
Reading the stylesheet off the import graph rather than a declared list
follows from the same instinct. Your bundler already knows which CSS a module
needs, because the module said so; a section that wants its own rules writes
import "./hero.css" in its own file and is done. There is nothing to register,
and no way for a section to ship without its styles.
The one thing the framework takes a position on is the cascade, and it takes
the position of getting out of the way. Author CSS is assigned no layer. Unlayered
CSS outranks every layer in the cascade, so a rule you wrote beats a utility that
sets the same property on the same element — which is stock Tailwind v4, and the
behaviour you would predict from reading your own stylesheet. An earlier design
folded author CSS into layers below Tailwind's utilities; a declaration there lost to any
utility setting the same property, however specific the selector, and it lost
silently and only on the published page. Those layers are gone, and concrete check
refuses a stylesheet that names them.
How it works
The entry owns the Tailwind import. Exactly one stylesheet in the graph writes
@import "tailwindcss" — by convention globals.css, the first CSS file
template.ts imports. Two of them double-emit Tailwind's preflight; none leaves
every utility uncompiled. concrete check refuses either count at
css/tailwind-import, naming the file.
@homepages/concrete/styles.css goes directly after it. That is the primitives'
own stylesheet, which is how the utility classes baked into Slot.Image and its
siblings reach your compiled CSS.
Import order is cascade order. The graph is walked from template.ts in the
order modules evaluate, exactly as Vite and Next treat CSS, and inlined in that
order before Tailwind compiles it. A package stylesheet (import "swiper/css")
takes the same route as your own.
Section-local CSS is just an import.
/* sections/hero.css */
.hero-grain {
background-image: url("./grain.png");
}url() references are resolved against the file that wrote them and
content-hashed into the template's static assets, so a relative path keeps
working after the file is inlined. Fonts arrive the same way — a
url("./fonts/canela.woff2") in a @font-face is an asset like any other.
Your CSS is not layered, and that has two consequences worth knowing. A
:root token you re-declare inside a section now takes effect instead of losing
to the entry stylesheet's own :root. And a utility applied conditionally —
className={open ? "" : "hidden"} — no longer outranks a display your
stylesheet sets on that element, so give that property one owner: key the
stylesheet on a data-* attribute rather than toggling a class beside it. If you
want a utility to win over a rule of yours, put that rule in Tailwind's own
@layer components; to demote somebody else's stylesheet, import it into a layer
you name.
Rendered formats change one rule. A deck, a social post or a print sheet is
captured by a download worker whose page reaches nothing but its own bundle, so its
compiled stylesheet may reference no external URL — a hosted font or a remote
image renders as a fallback in the captured artifact. concrete check grades the compiled
CSS and reports it at css/external-url. Ship the font
file in the workspace instead. A website has no such restriction.
The per-format @custom-variant block that makes deck-16x9:p-8 compile is
derived from the template's format and injected. You never write it, and
Tailwind drops a utility with an unknown variant silently — which is precisely
why it is not left to you.
What it is not
There is no theme object, no framework prefix to adopt, and no shared design system to inherit from. Nothing about your visual language is global, and there is no file elsewhere to edit before a token of yours becomes usable.
The framework's own base.css is not yours to edit either. It carries the layer
order, three reset gaps Tailwind's preflight leaves, and the classes the
primitives emit; it ships as its own page-level stylesheet, beside the one your
template compiles to. Everything it declares or emits is namespaced
concrete- — .concrete-section, .concrete-image-frame,
var(--concrete-window-h) — so a name in your stylesheet is never mistakable for
one of its. Exactly one of those is yours to set: --concrete-image-frame-bg,
which retints the placeholder fill behind an absent or loading <Image> or
<Video>. Declare it in your own CSS if the default neutral grey is wrong for
your palette; every other --concrete-* is read by base.css and set by it.
And Tailwind is not optional scaffolding you can route around. The entry
compiles with it, your tokens become utilities through it, and concrete check grades on
that assumption.
Where next
Theme tokens,
shipping a font,
a static asset and
a rendered-format template
are one guide each. Workspace states where globals.css
sits and what @homepages/concrete/styles.css brings with it, and
Formats is the set whose rendered classes are the ones that
refuse an external URL. The report that names a stylesheet comes from
concrete check; the rules it can raise here are
css/tailwind-import,
css/external-url and
css/compile-failed.
