gantry / gantry5

:rocket: Next Generation Template / Theme Framework
http://gantry.org
1.04k stars 204 forks source link

Excessive css-compiled files being generated #971

Open ghost opened 8 years ago

ghost commented 8 years ago

I spoke to @mahagr about this and he thinks it might be a bug.

When you change to production mode and recompile css from base outline there seems to be lots of css-compiled files being generated of the form custom_xx.css (where xx is an outline number) and the contents of the file appear to be coming from custom.scss - in other words we're multiplying the custom.scss file as many times as we have outlines?

These files do then not appear to be loaded at all in the frontend - so what purpose do they serve?

Also there appear to be other custom_outlinename.css files being generated too (where outlinename is the name of an outline) - again these do not appear to be being loaded in frontend - so what purpose do these serve?

2015-11-04_11-24-59

mahagr commented 8 years ago

I just checked this and it looks like that custom_x.css are indeed loaded by the site. Also _body_only, _error and _offline are loaded if you enter to one of those pages.

All of those files are generated in case if there's variables used in those files; for example using some background color may change the contents of the file.

As right now there's no detection if the configuration/files is/are identical, those extra files are needed just in case if user has customized anything in that particular outline.

See also #215.

ghost commented 8 years ago

Hmmm, I'm not sure about this. On my homepage of Callisto it is using outline 67. When if look at the myriad of files being generated in css-compiled there is one called callisto_67.css, when I look in frontend with firebug that file is NOT being loaded anywhere in frontend on that page? So when does it get loaded?

2015-11-05_12-04-54 2015-11-05_12-03-46

I'm still puzzled by this? Sorry if it's me...

mahagr commented 8 years ago

You have changed preset which forces Gantry to use that preset instead of loading the usual outline css. Try appending ?reset-settings into your url (or disable Gantry - Presets plugin) to remove the currently set preset.

ghost commented 8 years ago

No difference... It's definitely something to do with setting "production mode",

2015-11-05_13-33-34