Skip to content

Conversation

@vesper8
Copy link
Contributor

@vesper8 vesper8 commented Jul 26, 2022

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 laravel/nova-issues#4061 (comment).

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 vesper8 changed the title restores Tailwind styles [Nova 4] restores Tailwind styles Jul 26, 2022
@mbardelmeijer
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants