Skip to content
Discussion options

You must be logged in to vote

There's no per-case opt-out for this rule today — suggestCanonicalClasses is a single global lint setting. Your options:

Option 1: disable the diagnostic, scoped to this project

The setting can live in the workspace-level .vscode/settings.json, so it only affects this project and not your other Tailwind codebases:

{
  "tailwindCSS.lint.suggestCanonicalClasses": "ignore"
}

Option 2: disable the dynamic spacing scale (root cause)

The suggestion exists because v4 derives all spacing utilities from one scaling factor:

@theme {
  --spacing: 0.25rem;
}

That's why px-0.25 (→ 0.0625rem) is considered the "canonical" form of px-px. If you only want explicit spacing tokens in your design system, yo…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by balthild
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants