tailwindcss icon indicating copy to clipboard operation
tailwindcss copied to clipboard

Using Tailwind together with Vuetify in the same project?

Open ArnoBuschmann opened this issue 8 years ago • 20 comments

Hello :)

I discoverd Tailwind today and like it a lot. My thought was to add Tailwind to a current project that uses Vuetify already. The idea was to use just parts from Vuetify but also Tailwind in conjunction.

Are you aware of class conflicts between the two? After adding Tailwind it seems, some flexbox definitions are not working properly anymore.

ArnoBuschmann avatar May 11 '18 20:05 ArnoBuschmann

To avoid class conflicts you could make use of the prefix option that comes with tailwind:

The prefix option allows you to add a custom prefix to all of Tailwind's generated utility classes.

This can be really useful when layering Tailwind on top of existing CSS where there might be naming conflicts.

https://tailwindcss.com/docs/configuration/#prefix

robbinjohansson avatar May 11 '18 21:05 robbinjohansson

Oh great, sounds cool, thanks for the hint! :)

ArnoBuschmann avatar May 11 '18 22:05 ArnoBuschmann

You may run into some issues when trying to use tailwind with stylus, which is used by vuetify https://github.com/tailwindcss/discuss/issues/11

blowsie avatar Dec 13 '18 11:12 blowsie

@blowsie I just encountered this issue with Tailwind and Vuetify's Stylus

chi11ax avatar Jun 16 '19 13:06 chi11ax

Vuetify now uses sass.

marceloavf avatar Aug 30 '19 16:08 marceloavf

I wonder, does tailwind play nice with vuetify now its is using sass?

blowsie avatar Sep 20 '19 15:09 blowsie

Not really, i am having pages all over the screen since i introduced vuetify into my app :) Looking to solve it

nezaboravi avatar Oct 10 '19 13:10 nezaboravi

What do you mean, pages all over the screen?

blowsie avatar Oct 11 '19 08:10 blowsie

Not really, i am having pages all over the screen since i introduced vuetify into my app :) Looking to solve it

How were you able to solve this

BenjaminAlamu avatar Nov 29 '19 07:11 BenjaminAlamu

Not really, i am having pages all over the screen since i introduced vuetify into my app :) Looking to solve it

How were you able to solve this

Have you been able to come up with a solution? I am looking to use tailwind css on an existing project with vuetify and was wondering what kind of challenges I would face.

wickieonya avatar May 13 '20 12:05 wickieonya

@wickieonya You can achieve this by using Tailwind prefix

BenjaminAlamu avatar May 21 '20 12:05 BenjaminAlamu

Not really, i am having pages all over the screen since i introduced vuetify into my app :) Looking to solve it

How were you able to solve this

Have you been able to come up with a solution? I am looking to use tailwind css on an existing project with vuetify and was wondering what kind of challenges I would face.

I have not solved it. Just went pure Tailwind and built components I need in a day.

nezaboravi avatar Jun 04 '20 04:06 nezaboravi

Prefix sounds good

aznj avatar Dec 06 '20 17:12 aznj

Using tailwind prefix is only good if your project is in an initial phase

racs4 avatar Jan 06 '21 22:01 racs4

@racs4 Can you provide some context as to why Tailwind prefix should only be used in an initial phase

BenjaminAlamu avatar Jan 07 '21 05:01 BenjaminAlamu

@BenjaminAlamu Well, if you already used tailwind's classes in your project and then add a prefix, you would have to put that prefix in all classes in all places you already used it. Or am i wrong?

racs4 avatar Jan 08 '21 22:01 racs4

Hi, just came across tailwind and wanted to start the same thread, Arno started in 2018... The last comment was from Jan 19. What are u thinking of it today? We have a huge vuetify project and tailwind seems to push dev speed a lot. From your experience, is it wise to start with tailwind? Thanks

Stefan4691 avatar Apr 15 '22 14:04 Stefan4691

@Stefan4691 Hey, so currently went through a similar phase with a codebase. Progressively utilizing Tailwind speeded up iteration on components, main details to keep in mind was using a prefix , toggling the important key on the config and if possible using webpack 5 via the vue/cli latest since that unlocks the JIT engine.

If starting from scratch Tailwind and HeadlessUI pairs really well with vue 3.

gcavanunez avatar Apr 15 '22 15:04 gcavanunez

@Stefan4691 I use Vuetify a lot, but when I turn to tailwind, I found there are so many conflict between two framwork(if they can be comparable). When use tailwind deep, I think you will need "headless" js component more, and put css to tailwind and pure css. But vuetify framework is too coupling。 I think if we have mui,we can get some pure component, and that kind component can work better than vuetify like framwork. And because vuetify 3.0 version is too slow, so I rewrite my project by vue 3 and tailwind and tailwind heallessui and daisyui https://github.com/saadeghi/daisyui It took me some work, but I think it is worth. Because after adopting tailwind, css and js are decoupled. I use vuetify in my not so experienced stage, and I think I will never go back to use such weight framwork.

And when you use tailwind, it is so easy to use some react, and combine react and vue can deal some problem in some scene. Actually you can use vue 3 reactive system to deal with mutli frountend framework. When you master vue 3, you master react's most part. Tailwind is something you should try.

skimhugo avatar Apr 15 '22 15:04 skimhugo

@Stefan4691 Yes you can start with Tailwind. You just need to use a prefix for your Tailwind classes to prevent overlapping classes

BenjaminAlamu avatar Apr 15 '22 22:04 BenjaminAlamu