Skip to main content

Module tailwind

Module tailwind 

Source
Expand description

Tailwind CSS arbitrary-value detection. Tailwind CSS arbitrary-value detection.

Tailwind “arbitrary value” utilities (w-[13px], bg-[#abc], grid-cols-[1fr_2fr]) hardcode a one-off value in markup instead of using a configured scale token. They are not wrong, but a high count is a design- token-bypass signal that no per-rule linter aggregates across a codebase, and AI-assisted edits over-produce them. This scanner finds them in markup so fallow health --css can surface them as candidates. The caller MUST gate on the project actually using Tailwind: the prefix-[value] shape is Tailwind- specific in practice but not formally exclusive.

Structs§

TailwindArbitraryUse
One use of a Tailwind arbitrary-value utility, with the 1-based line it appears on.

Functions§

scan_tailwind_arbitrary_values
Scan markup source for Tailwind arbitrary-value utility tokens, one entry per occurrence. The caller must gate this on the project using Tailwind (the token shape is Tailwind-specific but not exclusive).