[TYPO3-core] RFC #8070: Feature: CSS styled content / scalable rendering of images

Steffen Kamper info at sk-typo3.de
Thu Dec 11 12:08:42 CET 2008


Hi,

Martin Kutschker schrieb:
> Franz Koch schrieb:
>> Hey guys,
>>
>>>> But the change should be easy. Anyway, to be forward compatible I advise
>>>> not to use any boolean switches like useEM, but something like
>>>> "dimUnit", "dimensionUnit" or simply "unit". The possible values are
>>>> "px" (the default), "em" and "ex".
>>> That would be a good thing, agreed.
>> I'd like to see typo3 beeing able to use any dimension unit for any size
>> value, like:
>>
>> width = 50%
>> space = 1em|1em
>>
>> so a parser determing the unit and calculate the rest based on it.
> 
> For the space there is nothing to calculate for TYPO3, right? I has just
> to apply it to the style attribute (instead of adding blindly "px" to
> integer). As em is based on the font size there is no point in
> calculating a pixel width from an em value on the server side.
> 
> I still don't know what should happen when you use a % value for the
> image with. For em (and ex) it's clear that ou need a scaling factor in
> respect to the original image (which BTW may vary based on the DPI of
> the image; and mind that the horizontal and vertical resulution may be
> different too).
> 
> So what should TYPO3 now do? Simple solution: don't scale the image at
> all. But this probably means that it will send happily the 5MB file of
> digital photographies.
> 
>> yes - using % for image scaling would really be something nice. Much
>> better than the em-concept that doesn't convince me at all.
> 
> I had no time to look at the mentioned site, but em/ex are nice as they
> scale with the font. If you have a style sheet selector that changes the
> font size then the image will scale with that.
> 
> OK, let's move the discussion to the rendering group.
> 
> Masi

as i see there is one place where calculation is need: textpic
For calculation px are needed. For using em, a scalefactor is needed to 
recalculate to px. So % doesn't make sense here.

At any other places you can use bananas as dimension as it's only passed 
through.

vg Steffen


More information about the TYPO3-team-core mailing list