Skip to main content

FAQ

Whether tailess replaces clsx and tailwind-merge, ss or cn, optional nesting, working without the plugin, Tailwind v3, @theme and runtime cost.

Helpers

Does this replace clsx and tailwind-merge?
No — it uses both ideas. cn is the same twMerge(clsx(...)) pairing your codebase probably already has, so tailess drops into one — though only tailwind-merge is a real dependency.
ss or cn?
ss does everything cn does, so either works. The habit worth having is cn while a className is only plain strings, and ss the moment a breakpoint or a state shows up — at which point everything, conditions included, moves inside the one call.
Do I have to migrate to nested groups?
No. Nesting is there for compound variants like dark:hover:and for grouping a breakpoint's own states; a flat object stays perfectly idiomatic. The ss page has the rules for both shapes.
Flat and nested
// the same thing — nesting is optionalss({ md: "p-6" });ss({ md: { base: "p-6" } });

The plugin and runtime cost

Does it work without the plugin?
The unprefixed base classes and match() do, because those are literals Tailwind finds by itself. Anything with a variant prefix needs the plugin — see how it works.
Is there a runtime cost in production?
Only the string building. The integration check and every warning are dev-only and drop out of a production bundle. Performance and size has the measured per-call numbers.

Tailwind support

Tailwind v3?
No. The @source inline(...) directive in v4 is what makes the bridge possible.
Does it work with a custom @theme?
Yes. Candidates go through Tailwind's own pipeline, so your theme values resolve exactly as they do for classes written by hand.