Tailwind Hasher is magical. It allows you to find the source of a tailwind class (or any atomic css system, e.g. UnoCSS, etc.) within your code base super easily. The gist is, it adds a tiny random hash to the front of all Before:
After:
That way, you can search for Which, PS, will never match, as that string does not exist in the code (as the Tailwind class is constructed dynamically!) It works with all basic
And works with all quote types: backtick, single-quote and double quote. FeaturesEasy On The EyesThe hash was specially design to be pleasant to look at. No UPPERCASE LETTERS! Ahhh. Relaxing. Saves Countless MinutesNo more crazy searches. Simple troublshooting! Even in huge React/Tailwind codebases! FAQQ. Why is this so awesome? And why didn't this exist before?!? A. Right?!? Q. How robust is the hash? A. There are 78,364,164,096 possible hashes. So birthday problem-wise, you will be okay with huge codebases. And if by some epically unlikely fluke you get a collision, just delete the hash & you will automagically get a new one. Phew! Q. Are the hashes stable? A. Yes! Once they are generated and assigned to a Q. Is this designed for production code? Or just dev? A. Both! So much easier to troubleshoot production code when you can figure out the exact source of the issue! Extension SettingsYou can access from the Command Palette, but in general better to just set to autosave? This extension adds a toggler in the status bar to tsx/jsx files, allowing you to toggle auto hash on save. (It's recommened that you leave it on auto-save mode. Why not?) Known IssuesNone, but feel free to log an issue if you come across one! Release Notes1.0.1Downgraded VS Code version to 1.96.0 work with Cursor AI. 1.0.0Initial release of Tailwind Hasher. Woot! Source code available at https://github.com/madasebrof/tailwind-class-hasher Enjoy! |