Skip to content

Rule · Lint

Many !important utilities in one file

lint/tw-important-soupwarnvoid lintupdated

Why it matters

Stacking ! modifiers means the cascade is being fought rather than designed. It breaks variants (hover/dark can no longer override), makes components unthemeable and usually hides a conflicting global style.

How to fix it

Find the conflicting rule (often an unlayered global CSS rule beating @layer utilities) and fix it at the source; use tailwind-merge/cn() to resolve class conflicts instead of !.

Example

css
/* move global resets into a layer so utilities win without ! */
@layer base {
  button { padding: 0; }
}

References

void lint reports 67 rules in this category. Static source checks with no browser: Tailwind v4 silent failures, Next.js 16 API traps, React render-body bugs, accessibility markup, SEO files and motion hygiene.