discuss icon indicating copy to clipboard operation
discuss copied to clipboard

I made an online tool to apply a prefix to vanilla tailwindcss classes

Open vesper8 opened this issue 6 years ago • 2 comments

After having to manually prefix components from sites like https://tailwindcomponents.com several times, I decided to make a small online tool to make things easier.

It should work on all classes from 1.1.2 release.

You can find it here: https://github.vue.tailwind-prefix.cbass.dev

Let me know if you find any use-case where it doesn't work properly or misses some classes

vesper8 avatar Oct 15 '19 12:10 vesper8

Is it different to https://tailwindcss.com/docs/configuration/#prefix ?

Maybe someone will find a use for it if placed on here https://github.com/aniftyco/awesome-tailwindcss

blowsie avatar Oct 17 '19 16:10 blowsie

It's to complement the option to use a prefix. It saves you the trouble of having to add "tw-" manually hundreds of times, or use find/replace. For example let's say you already wrote all of your html and suddenly you need to start using a prefix, then you could use this tool to automatically add a prefix to your existing html.

Or as in my common use-case, since I already do use a prefix since I also use Bootstrap 4 on my websites (because bootstrap-vue is too good), when I find a new component from https://tailwindcomponents.com that I'd like to import into my project, I can run it through my tool to add my desired prefix to the vanilla tailwind classes

vesper8 avatar Oct 17 '19 18:10 vesper8