Overview
This series follows Tailwind CSS v4 from CSS input and source-visible class candidates to resolved, ordered static CSS and host-managed rebuilds. It explains theme namespaces, source boundaries, utility and variant compilation, cascade ownership, caching, and CLI, bundler, PostCSS, and browser lifecycles. The architecture is most predictable when design vocabulary and candidates are explicit; runtime-only classes, legacy configuration, and browsers outside documented targets remain constraints.
Learning outcomes
- Tailwind CSS v4 treats CSS as both design-system input and compiler configuration.
- A requested class needs a complete visible or explicitly registered candidate that the compiler can resolve.
- Incremental builds can add candidates, while CSS or dependency changes require fresh compiler state.
- v4 fits best with explicit design vocabulary, source boundaries, modern browser targets, and deliberate cascade ownership.
Keywords
Preview every chapter · Unlock full text, audio, and video from chapter 4
PlansFAQ
How does Tailwind CSS turn a class into CSS?
Tailwind CSS scans a complete candidate, resolves its utility and value against compiler state, applies variants, sorts the result, and emits ordinary CSS.
Why can a Tailwind CSS class be present but generate no rule?
The scanner may miss a dynamic or ignored source, or the compiler may reject the utility, value, or variant; a host may also fail to rebuild.
What does @theme do in Tailwind CSS?
`@theme` creates CSS tokens and compiler vocabulary, so namespaces can expose utility or variant names; `:root` creates ordinary custom properties without that mapping.
When is a full Tailwind CSS rebuild necessary?
A full rebuild is needed when CSS, imports, themes, custom utilities or variants, configuration, or plugins change compiler state; new candidates in tracked content can often be incremental.
Is Tailwind CSS v4 a good fit for every project?
No. It fits best when classes are statically discoverable, design tokens and source boundaries are explicit, and browsers meet documented targets; runtime-only classes and legacy ownership raise integration costs.