Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get Tailwind and Vuetify to work together without causing style artifacts?

I worked all day yesterday to finish a google cloud function to power an appointment maker vue component. The last step is actually UI using the returned object. I was planning on using the vuetify date/time pickers with allowed dates and times.

After spending much of today trying to add vuetify to an existing project to only use those to components, it is causing style errors with some classes(margin, etc) that are coming from main.sass.

I thought of adding a prefix to tailwind, but I don't have the time or inclination to go back to all of my components and files to add the prefix to all of my tailwind classes.

Is there something I can do to scope the vuetify classes/css so as not to cause problems outside of the two components I am trying to use?

Can I add the vuetify css after my tailwind is compiled and assembled so the tailwind classes win take precedent?

I don't have code to show as it is fairly straight forward. I thought the google calendar API would be the hardest part of this component, but it is proving to be the easier.

like image 295
Kevin Rutledge Avatar asked Jun 11 '19 20:06

Kevin Rutledge


1 Answers

Tailwind allows you to prefix the generated classes in the configuration file. See https://tailwindcss.com/docs/configuration

like image 189
nicodev Avatar answered Nov 10 '22 20:11

nicodev