filament, liveire full page compnent and larave breeze css issue
Hi i have a full page livewire component and all is good except if I add the presets to the main tailwind config, it breaks the breeze dashboard and profile styling, if i remove presets everything works but the filament colours are not showing in the component, i did make a custom theme for the admin panel, but not sure if i need to use that or even how to use it in a full page component. thanks.
17 Replies
Are you just using the admin panel and want to change colors? Then use
->colors()
on the Panel Providerhi, not on the panel its a full page front facing component. been at it for hours, I have a tailwind config for my theme, which is working well in the panel, but if i add presets to main tailwind config the colors work but the laravel breeze css is messing up. Not sure what to do, hope you can help, thanks
Front-facing means just a Livewire component with the Form-Builder?
Can you share that tailwindconfig that breaks everything?
I am using a table on the frontend, thanks
it breaks the breeze dashboard and profile stylingCan you explain and/or share a screenshot on how it breaks? The preset specifies: colors, plugins, darkmode via class and content. But Tailwind should merge the preset with your config
I did something similar recently and had a brief issue with styling.
Here is my config:
Addtionally I wasn't using dark styles on my front-end so I also had to remove some dark references in my layout's Alpine. I think filament scans for dark references in order to decide what styles to serve the table in.
`<body class="antialiased"
x-cloak
x-data="{
{{-- removed darkMode: $persist(false),--}}
scrolled: false, mobileOpen: false,
showContact: $persist(false),
viewing: $persist('training'),
filterLevel: $persist('all'),
selectedService: $persist(''),
}"
x-init="window.addEventListener('scroll', () => { scrolled = (window.scrollY > 0) })"
{{--removed :class="{'dark': darkMode === false}"--}}
>
{{ $slot }}
@filamentScripts
@livewireScripts
@vite('resources/js/app.js')
</body>
hi please find a screenshot, the CSS styling is gone and if you click on the profile name on the header the drop-down does not open anymore.
I am using a filament table in a livewire full-page component.
the tailwind config I showed is the main config in the app, I have another config but it's for my panel theme.
this is my resources/views/components/layouts/app.blade.php
Thanks
I worked it out for anyone who has this issue when you add preset to tailwind config it overrides all x-app-layout and x-guest-layout you need to add @FilamentStyles in the head of the layout files, I hope this is correct @Dennis Koch Thanks
Not sure how a Tailwind Preset should override something in a Blade file? 🤔
It seems to override the x-app-layout, I double checked and if I add the preset the breeze files css doesnt work as expected. I hope my solution wont cause any issues? Thanks
But
<x-app-layout>
is a Blade file? How can a Tailwind Config overwrite anything?Your right just did another fresh install, installed the notifications package and the laravel normal views css are broken.
I went through the docs and installed everything, but if i have the preset in Tailwind config it breaks the default laravel views, banging my head now lol
is there anything that i missed? thanks
I haven't used it yet, but I think somebody else reported issues with the combination of Breeze and the Filament preset before.
Can I ask why we need the preset? Will the notifications still work?
It contains all the configuration. If you remove it some styles may not work on Filament components
I ran into the same issue a while ago, the way to 'fix' this, is head into the login blade, and add bg color to the tailwind class