Replies: 1 comment 1 reply
|
The reason you see warnings for Here is why that distinction matters in practice: 1. 1-to-1 Normalization vs Cross-Token Analysis
Because this evaluation is strictly 1-to-1, it is fast, stateless, and completely safe to run without inspecting adjacent class names. Suggesting
2. Where this fits best: Linter RulesBecause multi-class shorthand replacement is an opinionated refactoring rule rather than single-token normalization, this is typically handled by linters rather than the core language server's canonical suggester:
It is definitely a great quality-of-life helper, and surfacing it as a dedicated lint diagnostic or quick-fix action would be very useful! |
Uh oh!
There was an error while loading. Please reload this page.
To start with, I apologise if this is the wrong place to share this idea.
Idea
While using the latest v4 version of Tailwind, I got some warnings/tooltips that recommended I for example wrote
py-1.75instead ofpy-[7px]. I've also seen similar tooltips for other cases (can't think of all of them from the top of my head as I'm writing this).However, I didn't see any tooltips for the size class. The main idea is that if the user writes
w-x h-x, it could recommend that the user instead writesize-x. This sheds some light on that specific "helper" class and lowers the number of classes the user has to write to achieve the same result.I fully understand if this isn't a prioritized feature, and I just thought it could be a nice QOL on top of an already good system. If you need more info or have questions, just let me know, and I will try to answer as quickly as possible!
All reactions