WIP: Large CLS for the entire body if template added via bricks_before_header hook

Browser: Chrome 110
OS: macOS / Windows / Linux / etc.
URL: PRIVATELY / NDA

I have a pre-header added as a template, using the bricks_before_header hook. If I enable this template, gets 0.874 CLS

If I disable this template, there is no CLS whatsoever.

Due to an NDA, I can only send the link privately

Vs

Hi Apex,
Thanks so much for your report!

We are aware of the problem and already have a task for it on the to-do list.
The loading order causes the problem: the styles are probably output below the footer, which is suboptimal for an element at the top of the page.

You can work around the problem temporarily by inserting the necessary styles in a style tag in Bricks » settings » header scripts. This is not pretty, but it ensures the styles are available much earlier.

Best regards,
timmse

2 Likes

I’m looking forward to seeing this fixed also. I was surprised that I can’t use a Template element without FOUC. Any idea on when this will be fixed?

Any update on this problem?
Templates are very important feature of Bricks Builder, especially when you pass some controls to the client to have them edit only parts of the page.

Also, if you use a template for a header to use throughout the site it becomes very problematic.

Hi guys, we are still working on the task to find the most efficient and above all permanent solution. We will update the thread as usual as soon as this is done :v:

4 Likes

I have the same issue with empty cart and cart page.