[TYPO3-core] RFC #14247: Add a compressor/concatenator for CSS and JS

Steffen Kamper info at sk-typo3.de
Thu Apr 29 22:19:25 CEST 2010


Hi,

Steffen Gebert schrieb:
> Hi together,
> 
>>> $contents·=·str_replace(array("\r\n",·"\r",·"\n",·"\t",·'··',·'····',·'····'),·'',·$contents); 
>>>   I think the "\r\n" plus separete "\r" and "\n" are not necessary.
>>> Why is there four spaces twice?
> Yes, you're right, of course. I took this from somewhere on the web and 
> had only a quick look at it. I admit it also looked a bit weird for me 
> and thought of a regexp, but as it did its job, I didn't care any 
> further. Problem is that actually didn't have any time to write this 
> compressor, so it was quite in a hurry.
>

hurry is always bad - we need to look carefully to it even if time is 
short ;)

>> Also be careful with \*, there are css hacks using this and it will be 
>> stripped out too.
> Think we don't use such hacks in core.

think in long terms. Having this class in core it might be used from any 
extension. So it should be safe.

> 
>> Have a look to this to get an idea:
>> http://drupal.org/files/issues/minify_css.php__1.txt
> Sounds interesting. Will have a look and overwork the patch tomorrow 
> during bug day.
>

i don't see a reason why we don't take this algo from drupal as it's 
improved ;)

>> Are you sure that the skin CSS's will only be for media="all" ??
> What do you mean by this, Jigal?
> 

because media=all is hardcoded in the patch

vg Steffen


More information about the TYPO3-team-core mailing list