nuxt-modules / tailwindcss

Tailwind CSS module for Nuxt

Home Page:https://tailwindcss.nuxtjs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to encrypt tailwind classes?

JenuelDev opened this issue · comments

So Ive seen websites with anusual class name, and I came to learn that their class are encrypted or should I say hashed.

example:

class="1m8df4t jhou34 fMdyDu"

How to do something like this on nuxt tailwind module? thanks :)

Hey 👋 Thanks for opening an issue on this repository.

Yes, there would be websites that hash/obfuscate their classnames, and while this would normally be in their production build, it's likely not a TailwindCSS principle and there's lot of community discussion/solutions around it. For this module, we have #240 open as we work on what's possible and what's not. For the websites you've seen, it depends on their tech stack and they may have internal tools on this that specifically works with their project. In Vue/Vite, you may be able to use CSS Modules that has hashing in the class names, along with the styles being scoped for the most part - but again, this isn't the Tailwind way. We're trying to see what we can do with unplugin to develop a solution; again, keep an eye on #240. Closing this as duplicate!