Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Nova 4] restores Tailwind styles #107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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