Skip to content
Discussion options

You must be logged in to vote

At the moment, I don't believe the extension supports disabling canonical class warnings on a per-line, per-block, or per-file basis.

The warning is designed to encourage the use of Tailwind's canonical utility classes (for example, w-4 instead of w-[16px]) and is typically configured at the project level rather than the code level.

However, I think there are cases where arbitrary values like w-[123px] are the most practical solution, especially when:

  • The value doesn't map cleanly to the Tailwind scale.
  • You're matching a design specification exactly.
  • Introducing a custom theme token would add unnecessary complexity.

For now, the only available option may be to disable the warning global…

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by xloc
Comment options

You must be logged in to vote
1 reply
@wongjn
Comment options

wongjn Jun 3, 2026
Collaborator

Comment options

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