Skip Navigation

[Résolu] Delay in loading the proper CSS

This support ticket is created Il y a 6 années et 4 mois. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 réponses, has 3 voix.

Last updated by Luo Yang Il y a 6 années et 4 mois.

Assisted by: Luo Yang.

Auteur
Publications
#600956

I'm noticing the styles that I apply in the Toolset > Layouts CSS and JS > CSS Editor, they get applied AFTER the page loads. So there is a glitch in time, it shows all the themes default styles first and then it loads mine and looks fine.

What's the best way to adjust this so there is no glitch in styling?

ALSO, when you EDIT your website in the "Front End" it doesn't apply my styles at ALL. So I don't understand why it does that either.

#601063

Nigel
Supporter

Languages: Anglais (English ) Espagnol (Español )

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

Hi Justin

When you add custom CSS at Toolset > Layouts CSS & JS it creates a dynamic stylesheet which then gets enqueued.

It is added late, with the expectation that you will be overwriting theme styles etc. and so it needs to be enqueued after other CSS files.

If that results in a perceptible delay where you see the theme styles before they are overridden, the only alternative is to edit your theme (or, presumably, child theme) stylesheet and add your styles directly there so that they are loaded at the same time, or, if that is not possible for some reason, create a dedicated custom stylesheet which you enqueue immediately after your theme's stylesheet.

#601167

Oh ok, thanks. That's too bad, would be nice to just use the tools provided so we don't have to go that route.

#601487

If you agree, we can take it as a feature request, our developers will evaluate it.
As a workaround, you can put those CSS codes into your theme file style.css, and test again

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.