nova-attach-many icon indicating copy to clipboard operation
nova-attach-many copied to clipboard

[Nova 4] restores Tailwind styles

Open vesper8 opened this issue 2 years ago • 1 comments

Something changed in Nova 4 that breaks a lot of Tailwind classes. Basically, any class that is not used somewhere in Nova v4 won't be available inside 3rd party fields, cards, tools, etc.

It's explained in https://github.com/laravel/nova-issues/issues/4061#issuecomment-1108865028.

Fixing this involves adding tailwind to the package and using a way of "scoping" the field with a custom class.

Jess Archer's tweet here helped with the solution: https://twitter.com/jessarchercodes/status/1515139491794599939?

I've made the changes below. But for some reason I am having difficulty building the dist files because of the way you link to laravel-nova inside mix.js

You should be able to build the dist files and then test that the Tailwind styles are back to working like they were before.

Cheers!

vesper8 avatar Jul 26 '22 00:07 vesper8

@dillingham could you perhaps take a look at this one and tag a release if you agree? Thanks 🙏

mbardelmeijer avatar Sep 02 '22 14:09 mbardelmeijer