Skip Navigation

[Resolved] Minify toolset css

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

Problem: Google's Page Speed Insight tool is flagging that my CSS is not minified for Toolset Starter Theme.

Solution: Other 3rd party tools can minify and enqueue CSS for your theme. Toolset Starter Theme's CSS is minified except for some comments required by WordPress. For simplicity, it's not likely that Toolset will begin enqueueing separate minified CSS files. The Toolset Starter Child theme is made to be modified, so it doesn't make sense for us to start with a minified file here.

This support ticket is created 6 years, 12 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by marcB-6 6 years, 11 months ago.

Assisted by: Christian Cox.

Author
Posts
#516179
Schermafbeelding 2017-04-23 om 10.28.36.png

Hi guys,

Running a test on googe page speed insights i saw that the css of the starter theme is not minified. Is it a possibility to minify it by standard (since everyone is working with a child theme)?
Or is there a reason not to minify it by standard?

Thanks!
Marc

#516251

Hi, I think Google's Page Speed Insights tool is balking at the comments at the top of each of these files. If you notice when you install Toolset Starter Child theme, there is no actual CSS included in style.css - yet the tool still complains. If you open the Toolset Starter theme style.css file, you can see the styles are minified into one line, with the exception of comments.

I think there are ways to get around this, but most of them involve the implementation of other 3rd party plugins that will scan your code and generate minified files, then enqueue them correctly. For simplicity, I don't think this is likely to be included in the Toolset Starter theme or the default child theme.

#517721

Ok, thank you Christian!

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