v4 - Flicker when using a custom theme
When using a custom theme that overrides styles using the apply directive in v4 i get a slight flicker on loading when it changes from the default styles to the overriden styles. Is there any way to avoid this or maybe i am doing it wrong?

Solution:Jump to solution
Issue was on my side. fixed it by adding outline-transparent to the .fi-input-wrp, and then changing color on focus. Because of the transition applied to the .fi-input-wrp by default, the outline was black before turning blue, which was the issue i saw
```
.fi-input-wrp {
@apply outline-transparent;
&:not(.fi-disabled):not(:has(.fi-ac-action:focus)) {...
9 Replies
In the example above i am overriding the form focus state color, but you can see the original black/gray being visible for a split second
Maybe share some code.
Sorry, yes i should have. Here it is:
For example in the theme.css:
Without the theme:

With the theme:

I think this is to do with the CSS you apply and the browser behaviour rather than Filament?
we dont use
outline
for instance, but you are applying an outline on top of our right?
check our CSS files and adapt to the ring we use?ok thanks, yes it could be. I do both ring and outline for a cool effect, which worked fine in filament v3 but causes issues on v4. Though, might be a tailwind v4 quirck.
Adding a transition to it seems to resolve it a bit to the point where its not really noticable
maybe remove the default filament ring before applying yours?
if you look at the wrapper.css you can see what we use
also its criminal to put so many arbitrary tailwind selectors in @apply statements, do proper selectors in css with nesting 😅
Solution
Issue was on my side. fixed it by adding outline-transparent to the .fi-input-wrp, and then changing color on focus. Because of the transition applied to the .fi-input-wrp by default, the outline was black before turning blue, which was the issue i saw
Thanks for the help!