Skip Navigation

[Gelöst] Site load: custom toolset css is loaded too late

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

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 vor 6 Jahren, 4 Monaten. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

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)

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Matthias Reichl vor 6 Jahren, 3 Monaten.

Assistiert von: Nigel.

Author
Artikel
#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: versteckter Link

Regards,

#1076171

Nigel
Supporter

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: 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,