Re: [css2xslfo-support] [css2xslfo] margin-top, margin-bottom not acknowledged
Brought to you by:
wdonne
From: <wer...@re...> - 2006-03-13 12:48:20
|
Andreas, I'm still puzzled by this. I just downloaded Xinc 2.0.2 and there I see the correct margins around the block that corresponds to div.outline. Best regards, Werner. Andreas Jung wrote: > Thanks, >=20 > I am using XFC 2.3 and Xinc 2.02. I hacked around the issue by modifyin= g > the css.xsl stylesheet and by adding some post-processing on the > generated 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. >=20 > Andreas >=20 > --On 13. M=E4rz 2006 11:56:01 +0100 Werner Donn=E9 <wer...@re...>= wrote: >=20 >> Hi Andreas, >> >> I have attached the output of Xinc 2.0.1 using CSSToXSLFO 1.0, but fir= st >> 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-botto= m >> with space-after is the treatment of conditionality. For the space-* >> properties it is "discard", while for the margin-* properties it is se= t >> to "retain". The XSL-FO 1.0 spec says it is for compatibility with CSS= 2. >> 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 desire= d >> 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=E4rz 2006 10:38:52 +0100 Werner Donn=E9 <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 fa= r. >>>> 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 X= inc >>> 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 >>> >>> >> >> --=20 >> Werner Donn=E9 -- Re BVBA >> Engelbeekstraat 8 >> B-3300 Tienen >> tel: (+32) 486 425803 e-mail: wer...@re... >=20 >=20 >=20 --=20 Werner Donn=E9 -- Re BVBA Engelbeekstraat 8 B-3300 Tienen tel: (+32) 486 425803 e-mail: wer...@re... |