The v2 engine: config in, CSS out — phases, ordering and output sections.

How the engine does it#

CSSGenerator resolves the theme, iterates utility modules, applies variant selection, then serializes. Understanding the phases explains every v2 behavior.

Example#

js
const gen = new CSSGenerator({ theme: {}, variants: ['hover'] });
const css = gen.generate({ minify: true });

From v2 to v3#

Everything in this article survives the upgrade — the v2 → v3 migration guide keeps the generator API stable while fixing spacing and responsive bugs.

Utilities · Themes · Configuration