Re: [css2xslfo-support] [css2xslfo] margin-top, margin-bottom not acknowledged
Brought to you by:
wdonne
From: <wer...@re...> - 2006-03-13 10:55:09
|
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: >=20 >=20 > --On 6. M=E4rz 2006 10:38:52 +0100 Werner Donn=E9 <wer...@re...> = wrote: >=20 >> 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. >> >> >=20 > This issue seems to depend very much on the converter. Neither with Xin= c > nor XFC I can see the top/bottom margin. I investigated the generated F= O > 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. I= s > there any reason why you use space-after|before vs. border-bottom|top? >=20 > What is the recommend way to get around this issue? >=20 > Andreas >=20 >=20 --=20 Werner Donn=E9 -- Re BVBA Engelbeekstraat 8 B-3300 Tienen tel: (+32) 486 425803 e-mail: wer...@re... |