22437 Posts in 7058 Topics by 2750 members
|Go to End|
26 June 2012 at 6:02am
Does anyone know if SS ever incorporated an easy way to minify css? I know the combine js method automatically minifies the js, but I haven't been able to find a way to make SS minify css. It's not a big deal to minify on my own, just thought maybe I was missing yet another cool built in action.
26 June 2012 at 6:27am Last edited: 26 June 2012 7:30am
to minify the css, its almost exactly like minifying the js.
Throw your css files into the array, then have the following line:
I don't add my IE style sheets though, because I call them like this:
Requirements::insertHeadTags('<!--[if IE 6]><style type="text/css">@import url(' . $themeFolder . '/css/ie6.css);</style><![endif]-->');
Edit: Almost forgot... Silverstripe will only minify your js and css if you are in "Live" mode.
26 June 2012 at 7:42am Last edited: 26 June 2012 7:53am
I did know about the live mode, but thanks for the heads up. I'm sure someone reading this would probably be banging their head against the wall if they tried it in dev...
Thanks for your input!
|Go to Top|