Public form theme or custom css?
I am working on creating a public form. I have panels as well in the same application. This form has a specific way it needs to be laid out and the standard filament css just won't work here. Is there an easy way to create a reusable theme that I can apply only to these public forms or if it is even possible should I simply remove the @vite('resources/css/app.css') from the layout file and use my own CSS? Or will that break other functionality?
10 Replies
I just make another layouts
When you do that do you simply exclude the @vite(resources/css/app.css') and if so will that break any other functionality?
Nah I leave it there, so I have 2 layouts the app.layouts is for filament and the other one in your case for public form.
That way I don't break the filament, because I tried to put both inside the app layout and my filament panel is broken 🤣🤣
So I guess what I am trying to figure out is. When I include the @vite(resources/css/app.css') it formats the form specifically to the filament way. So if I keep that in a new layout which I do have for the public forms I would have to override a whole bunch of stuff to get it to work. So do you create a new app.forms.css file or how do you seperate out the css stuff is what I am trying to get at.
create another css file
with its tailwind configuration
and add this to your frontend layout
check the docs for the forms, that what you need
its all about the
content
the tailwind config fileI usually create another master.blade.php for all my front end needs so I don't break the filament.
I have created a seperate blade file it is just the css that is confusing. @Lara Zeus I have looked through all the docs for filament and have not been able to find that but I will go over it again maybe I missed something. Thank you both. I figured it would be a new @vite(file) now I just have to figure out how that part works. Now that my suspicions appear to be correct I will hunt it down.
I do have the form stuff installed but the tailwind.config.js is configured for the panel stuff. I guess I am just confused on how to keep them seperate so I do not break panel stuff.
It may just be I need to go really figure out vite and it may have the ability to compile separate css files. That might be the part I am missing.
So more or less have filament panel play nice with a public form using a different form layout then panel uses.
I think it would be best to just override the css applied on the form.