Re: [css2xslfo-support] [css2xslfo] margin-top, margin-bottom not acknowledged
Brought to you by:
wdonne
From: Andreas J. <li...@an...> - 2006-03-13 11:06:15
|
Thanks, I am using XFC 2.3 and Xinc 2.02. I hacked around the issue by modifying the css.xsl stylesheet and by adding some post-processing on the generated=20 FO file...this works for us now. I'll try to upgrade to csstoxslfo 1.3 for the next major release of our products and hope to solve this is a more = sane way. Andreas --On 13. M=C3=A4rz 2006 11:56:01 +0100 Werner Donn=C3=A9 = <wer...@re...> wrote: > Hi Andreas, > > I have attached the output of Xinc 2.0.1 using CSSToXSLFO 1.0, but first > I have set the space-after to "0.0em" in order to show the difference. > The top margin is there and the bottom margin is 0. I have also added > the RTF file generated with XFC 2.1. It shows the same result. Are we > using the same version of Xinc and XFC? > > The reason for replacing margin-top with space-before and margin-bottom > with space-after is the treatment of conditionality. For the space-* > properties it is "discard", while for the margin-* properties it is set > to "retain". The XSL-FO 1.0 spec says it is for compatibility with CSS2. > In other words, CSSToXSLFO is not compliant with CSS2 in this regard. > > I did it at the time, because in most cases a top margin is not desired > when a a block is the first in a reference area. If the CSS2 behaviour > would be followed, the CSSToXSLFO user should be aware of when a > reference area is generated and when not and in the appropriate places > the style sheet should written to set the margin-top to 0 explicitly. > There are two problems with this. First, the user is not aware of the > difference between reference areas and normal areas, nor he should be. > Second, style sheets become much more complicated and it will cause a > lot of trial and error, because you don't always know when to expect > a reference area. For example, say you have a top margin for the "h1" > element. For the first one you need a special rule ("first-child") to > set it to 0. > > Best regards, > > Werner. > > Andreas Jung wrote: >> >> >> --On 6. M=C3=A4rz 2006 10:38:52 +0100 Werner Donn=C3=A9 = <wer...@re...> >> wrote: >> >>> Hi Andreas, >>> >>> I tried it with version 1.0 as well as 1.3 and the margin is there. >>> Set it to zero to see the difference. It is not part of the content >>> rectangle however, which is why the background doesn't reach that far. >>> If that is what you want you should use padding instead of margin. >>> >>> >> >> This issue seems to depend very much on the converter. Neither with Xinc >> nor XFC I can see the top/bottom margin. I investigated the generated FO >> file. >> The related fo:block has margin-top|bottom set to 0em but uses >> space-after|before to specify the margin. Replacing >> space-after|space-before with margin-bottom|top let the margins work. Is >> there any reason why you use space-after|before vs. border-bottom|top? >> >> What is the recommend way to get around this issue? >> >> Andreas >> >> > > -- > Werner Donn=C3=A9 -- Re BVBA > Engelbeekstraat 8 > B-3300 Tienen > tel: (+32) 486 425803 e-mail: wer...@re... |