Concepts
How a value is judged
Plumber takes each value through five stages. It reads what you wrote, compiles it with your own Tailwind, resolves it, compares it with your tokens and reports the result.
Read
This stage reads your source, without a browser. By default that is every file in your project that isn’t installed or generated, whatever folder it is in, plus your own packages reached through workspace links and tsconfig aliases. Set source in your config to change it.
- Classes in
classNameandclass, including both sides of a condition, arrays and object keys, and calls tocn,clsx,cx,classNames,twMerge,twJoin,cvaandtv. Classes kept in a variable, an import or a function's return value are followed too. - Stylesheets: your Tailwind entry, everything it imports, CSS imported from your components, and CSS files in your sources.
- Inline styles written as
style={{ … }}. Constants are worked out, including imported ones; a ternary, a lookup table or a prop typed'sm' | 'lg'is read as every outcome; a token beside a runtime number, like`calc(var(--spacing-s3) * ${k})`, is judged by the token; andk * STAGGERis judged bySTAGGER, because that is the value someone chose.
Each value keeps the exact line and column it was written at, so a finding points at the code you wrote.
Compile
Classes, @apply and stylesheets go through the Tailwind v4 installed in your project, with your theme and plugins, as they do in your build. What comes out is CSS declarations, each still tied to its source line.
Inline styles skip this stage because they are already CSS. A number like gap: 13 becomes 13px, as React would render it.
Resolve
Plumber works out what each declaration's value comes to. It follows var() through your tokens, including fallbacks, and works out calc() arithmetic. rem counts as 16px.
Some values have no single number, so Plumber leaves them unresolved: env(), light-dark(), em, percentages and viewport units, and min(), max() or clamp(). So does a token that changes with the theme.
Compare
How a value is compared with your tokens depends on its family:
| Family | Passes when |
|---|---|
| Spacing, Radius, Type | the value equals one of your tokens, whether it was written as the token or as the number |
| Colour, Motion, Elevation, Z-index | the value refers to one of your tokens |
So gap: 12px passes when 12px is a token, but color: #2f5be0 is flagged even if it matches your primary exactly, because it won't follow a theme change. You can change this per family with identity in your config.
When a value misses, Plumber names the tokens to choose from, each with its reason. For spacing these are the tokens just below and just above, if they are within 4px or half the value, whichever is more.
Report
| Rule | Severity | When |
|---|---|---|
provenance/<family> | error | a value that isn’t on your tokens, in CSS, @apply or an inline style |
provenance/arbitrary | error | the same, written as a bracket class like gap-[13px]; its fix rewrites the class |
provenance/<family>/framework | error | a Tailwind default your theme doesn't include |
provenance/<family>/by-value | warning | a literal that equals a token, in a family judged by reference |
existence/dead-class | error | a class that compiles to nothing |
The same value in several places, under the same rule, is one finding that lists every place.