Using Tailwind together with Vuetify in the same project?
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.
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
Oh great, sounds cool, thanks for the hint! :)
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 I just encountered this issue with Tailwind and Vuetify's Stylus
Vuetify now uses sass.
I wonder, does tailwind play nice with vuetify now its is using sass?
Not really, i am having pages all over the screen since i introduced vuetify into my app :) Looking to solve it
What do you mean, pages all over the screen?
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
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 You can achieve this by using Tailwind prefix
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.
Prefix sounds good
Using tailwind prefix is only good if your project is in an initial phase
@racs4 Can you provide some context as to why Tailwind prefix should only be used in an initial phase
@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?
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 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.
@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.
@Stefan4691 Yes you can start with Tailwind. You just need to use a prefix for your Tailwind classes to prevent overlapping classes