Open ottosson opened 4 years ago
Thats an interesting idea, how would you do it?
Even if it doesn't automatically replace it maybe we can get it to emit a warning saying "there are redundant classes"?
Even if it doesn't automatically replace it maybe we can get it to emit a warning saying "there are redundant classes"?
I like this better since I feel most of the conflicts could lead to unexpected resolutions. Of course the applied styles would be the same but imho it's better to let users know and let them deal with that on their own like most linters do. Maybe we could add a fix
option to automatically handle those like eslint
or stylelint
do? Should this feature become its own stylelint plugin then?
Would be perfect to have it into stylelint
, agreed ! 🙏🏻
Core's tailwindcss-intellisense
has been taking care of this for a while so I guess we can close? No need to duplicate functionality unless required by some kind of incompatible tooling.
Is your feature request related to a problem? Please describe. Not really. Might improve bundle size if unused classes are removed.
Describe the solution you'd like Similarly to removing exact duplicate classes Headwind should be able to remove duplicate class types. If I add two color classes, like
text-red-400
andtext-red-600
, 400 is redundant and will be overridden by 600 which means 400 could be removed.