Skip Navigation

[Resolved] Site load: custom toolset css is loaded too late

This thread is resolved. Here is a description of the problem and solution.

Problem:
Custom CSS is added to a View but takes some time to take effect, causing page jank.

Solution:
For technical reasons the custom CSS is added via JavaScript. The editors in a View can take any valid HTML, and so the custom CSS can be added directly inside style tags and will be printed directly in the page source and be effective immediately.

This support ticket is created 6 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 2 replies, has 2 voices.

Last updated by Matthias Reichl 6 years, 3 months ago.

Assisted by: Nigel.

Author
Posts
#1076123

Hi,

I´ve created a view and used the options for custom css to style my view. I´ve inserted my created via shortcode into a page. Everytime the page loads the default styles are loaded and a few seconds later the custom css, which I set.

Is there any trick to load custom styles prior? I´ve created a screencast: hidden link

Regards,

#1076171

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screen Shot 2018-08-07 at 10.09.53.png

Hi Rainer

The delay happens because of the specifics of how we implemented adding custom CSS to a View to be valid HTML prior to HTML 5 (which requires adding CSS style tags only in the page head), but we intend to change this so that there will not be any such delay unless your site must be HTML4 valid.

In the meantime you should know that you can add HTML markup to any of the editors in the View, and can add style tags directly to one of the the View editors.

I would probably add it to the final Output Editor so that it was less obtrusive, as in the screenshot.

#1076184

Hi,

thanks a lot. The trick did it and the page loading time is a bit better.

Regards,