Skip to main content

Module tailwind

Module tailwind 

Source
Expand description

Tailwind utility grammar used by the compiler.

There is no closed catalog of Tailwind classes: arbitrary values, stacked variants, @theme tokens and plugins generate names at compile time. What we can know is the shape of a utility (variant: + core plugin prefix / bare word / [arbitrary]), which is enough to leave custom BEM-style classes like .header-signin or .btn-notch alone.

Vitest loads this classifier through WASM (looks_like_tailwind_utility).

Functionsยง

core_utility_name
Strip stacked variants (lg:hover:) and !important markers, leaving the core utility (flex, bg-red-500, content-['']).
looks_like_tailwind_utility
True for Tailwind-shaped class names, false for custom hyphenated components (.header-signin, .btn-notch).