|
They are semantically different ( |
Replies: 1 comment
|
There's no per-case opt-out for this rule today — Option 1: disable the diagnostic, scoped to this project The setting can live in the workspace-level {
"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 @theme {
--spacing: initial;
--spacing-1: 0.25rem;
--spacing-2: 0.5rem;
/* ... */
}With the dynamic scale disabled, For the record, the Tailwind team has confirmed this behavior is intentional; see tailwindlabs/tailwindcss-intellisense#1527 for the maintainer's explanation. Your underlying point (that |
There's no per-case opt-out for this rule today —
suggestCanonicalClassesis 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:
That's why
px-0.25(→0.0625rem) is considered the "canonical" form ofpx-px. If you only want explicit spacing tokens in your design system, yo…