Minify CSS

Skinning and designing Serendipity (CSS, HTML, Smarty)
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Minify CSS

Post by Timbalu »

Did you try adding a

Code: Select all

              case 'css_backend':
                $eventData = CssMin::minify($eventData);
                break;
too?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
danst0
Regular
Posts: 197
Joined: Tue Jul 13, 2004 10:50 am

Re: Minify CSS

Post by danst0 »

No effect;-(
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Minify CSS

Post by Timbalu »

I bet we could get this to work somehow.... :wink: but why should we take a plugin to minify static content again and again? This does not make sense!
Doing it once and linking the minified file is ok. In most times serendipity.css with additional plugin styles is quite small, so actually no really need to minify. If you got your own, like the ones in the default template bulletproof this might make some more sense.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
danst0
Regular
Posts: 197
Joined: Tue Jul 13, 2004 10:50 am

Re: Minify CSS

Post by danst0 »

My s9y.css is cached for about a week, so CPU load can be probably neglected. But for first time users a minification would mean a drastic reduction in size (in my case about 7kb). Furthermore: I recently read that google is using page speed as a criteria for search rank as well...

Daniel

Edit: Of course I am the first who would prefer some caching mechanism to this dynamic stuff. Nonetheless minification should be done by the engine not me. It is annoying to always switch between a minified version and a non-minified one in my template directory...
Post Reply