I want to be able to make some minor CSS tweaks (laravel 10/Filament V3)

But I can't seem to figure out where to put the custom CSS. The docs mention adding CSS to the classes, but I cannot seem to figure out where to put the custom css. Putting it in resources/css/app.css does nothing. Really I just want to change the width of the main panel at the moment, but will probably have some other minor tweaks later. The docs discourage publishing the views... so ?
Solution:
This question is repeated a lot
Jump to solution
8 Replies
Solution
krekas
krekas5mo ago
This question is repeated a lot
krekas
krekas5mo ago
Create a custom theme. Checks the docs how to
dodecadaedra
dodecadaedra5mo ago
ah. Well it would help if in the section on customizing styles they would say that this is a requirement. Thank you. I'll try that. That worked, thank you.
krekas
krekas5mo ago
It's open source. Make a pr to the docs if you think it's needed
bogus
bogus5mo ago
@dodecadaedra https://filamentphp.com/docs/3.x/support/assets#using-tailwind-css-in-plugins
FilamentAsset::register([
Css::make('custom-stylesheet', __DIR__ . '/../../resources/css/custom.css'),
]);
FilamentAsset::register([
Css::make('custom-stylesheet', __DIR__ . '/../../resources/css/custom.css'),
]);
Now, when the php artisan filament:assets command is run, this CSS file is copied into the /public directory
dodecadaedra
dodecadaedra5mo ago
Good to know. Thank you.
bogus
bogus5mo ago
>>Really I just want to change the width of the main panel at the moment, This can be done without changing styles `php return $panel ->maxContentWidth('full');
dodecadaedra
dodecadaedra5mo ago
Thank you!