F
Filament4mo ago
Ryno

bg-[color] not applying

bg-black does not work, but only bg-black/50 works. I removed tailwind 4 from dependencies and added 3 by follwing the docs.
Solution:
adding './resources/views/livewire/*.blade.php', this to panel specific tailwind config fixed the isssue......
Jump to solution
12 Replies
Ryno
RynoOP4mo ago
bg-gray-950 does not work
Dennis Koch
Dennis Koch4mo ago
Did you create a custom theme?
Ryno
RynoOP4mo ago
I followed the docs and i've this
import preset from '../../../../vendor/filament/filament/tailwind.config.preset'

export default {
presets: [preset],
content: [
'./app/Filament/Admin/**/*.php',
'./resources/views/filament/admin/**/*.blade.php',
'./vendor/filament/**/*.blade.php',
],
}
import preset from '../../../../vendor/filament/filament/tailwind.config.preset'

export default {
presets: [preset],
content: [
'./app/Filament/Admin/**/*.php',
'./resources/views/filament/admin/**/*.blade.php',
'./vendor/filament/**/*.blade.php',
],
}
`
Dennis Koch
Dennis Koch4mo ago
Did you recompile the theme after adding the TW classes?
Ryno
RynoOP4mo ago
yes, indeed, but i've a livewire component injecting it using the render hook
Dennis Koch
Dennis Koch4mo ago
So you use the TW classes in the LW component or the blade? Both files are probably not covered by content config in the Tailwind config file.
Ryno
RynoOP4mo ago
in the blade.php file
Dennis Koch
Dennis Koch4mo ago
Is the Blade file located in './resources/views/filament/admin/**/*.blade.php', ?
Ryno
RynoOP4mo ago
thats a very good point, i'll add livewire path to content in the root tailwind config
content: [
"./resources/**/*.blade.php",
"./resources/**/*.js",
"./resources/**/*.vue",
],
content: [
"./resources/**/*.blade.php",
"./resources/**/*.js",
"./resources/**/*.vue",
],
i believe this is covering everything under resources. my livewire blade file under resources/views/livewire
Dennis Koch
Dennis Koch4mo ago
Root Tailwind Config !== Filament Tailwind Config Those are 2 separate files
Solution
Ryno
Ryno4mo ago
adding './resources/views/livewire/*.blade.php', this to panel specific tailwind config fixed the isssue...
Ryno
RynoOP4mo ago
Thanks.

Did you find this page helpful?