[TYPO3-core] RFC: Bug #4770: css_styled_content - rowSpace also puts space below last image row

Ernesto Baschny [cron IT] ernst at cron-it.de
Mon Nov 26 13:05:59 CET 2007


Benjamin Mack wrote: on 24.11.2007 22:10:
> Hey all,
> 
> (full link + patch this time)
> this is a SVN patch request.
> 
> Branches: Trunk only.
> 
> BT Reference: http://bugs.typo3.org/view.php?id=4770
> 
> Problem:
> As I figured there is this undocumented constant value "rowSpace" I also
> noticed that when setting "rowSpace", it only applies "rowSpace" as
> margin-bottom to each image row, which means that there will be a space
> of X pixels below the last image as well. It rather be defined as "space
> between the image rows", not "space below every row", at least that's
> what the general idea is.

It is documented, as css_styled_content's render_textpic tries to
simulate the same properties as we have in cObj IMGTEXT. See
http://typo3.org/documentation/document-library/references/doc_core_tsref/current/view/8/16/

> Solution:
> Maybe we can just add another CSS class for the last row of images,
> "csc-image-lastrow" which gets the default rowSpace like the others, but
> the user can apply different values if he likes it.

Looks ok to me, with the following modification: Imagine that there are
people using css_styled_content with "custom" TypoScript, meaning they
have a "tt_content.textpic >" at the start of their template and define
their own TypoScript for the whole rendering. This change of behaviour
in PHP you are introducing makes the "old TypoScript" stop working as
expected, as the last row won't get any wrapping at all if there is no
"imageLastRowStdWrap" configuration.

So to keep the output backwards compatible I would like the code to
fallback to wrapping with "imageRowStdWrap" if "imageLastRowStdWrap" is
not defined.

Doesn't it make sense to change the default css in compatVersion 4.2.0,
so that we get not only the new class but also a correct rendering "by
default" in new installations? The problem is that we would need to add
a "string" to plugin.tx_cssstyledcontent._CSS_DEFAULT_STYLE. Is this
doable in TypoScript?

Cheers,
Ernesto


More information about the TYPO3-team-core mailing list