Re: [css2xslfo-support] Padding for top and bottom regions - continued for margins
Brought to you by:
wdonne
From: USHAKOV, S. <us...@in...> - 2011-09-21 23:57:39
|
Hi Werner again, and sorry for the delay. I take your point on absense of the concept of margins for statics in XSL-FO. But not sure I am ready to agree with your completely :) In case when layout is translated from one description language to another (this is what, say, FOP does and this is what CSSToXSLFO does) it is not necessary that two description languages have very much in common, even at concept level. XSL-FO does not look much alike, say, PostScript. And still it does not prevent FOP from doing its job. And in case the target system does not have some concept that is supported by the source one, is looks natural for the user to expect the converter to take care of it, and to achieve the expected result with the tools available in the target system... That's why it looks natural to expect that if static regions are allowed to be expressed in HTML/CSS terms, then these CSS margins should appear in the output too... Well, I admit that margins for static regions may be argueable. But my eye was caught recently by one more phenomenon that looks unexpected to me. It looks like the topmost elemen in the body region does not get its top margin too. Please find an example attached. The 'h1' top margin is not honored. At least for me with FOP. It's also curious that if the body element gets a border, then this topmost child's margin gets honored too - just uncomment the appropriate CSS rule... My best regards, Sergey ----- Original Message ----- From: "Werner Donné" <wer...@pi...> To: "USHAKOV, Sergey" <us...@in...> Cc: <css...@li...> Sent: Monday, September 19, 2011 11:13 AM Subject: Re: [css2xslfo-support] Padding for top and bottom regions Hi Sergey, There are no margins for static regions in XSL-FO. You can set the margin on the body region instead. Best regards, Werner. On 18 Sep 2011, at 11:21, USHAKOV, Sergey wrote: > Hi Werner, > > preparing an example helped bringing thoughts in order quite a lot :) > > I was wrong partially, as nothing looks wrong about top regions. Any space > required for them is sufficiently controlled with their "height" > attribute. > > Still there seems to be a problem with bottom regions. You can control > their height. You can apply borders. Paddings inside the borders behave as > expected. But if you wish to have a non-zero top margin to separate the > top border from the body region, then it seems to be ignored. Please find > a sample attached. I have declared "margin-top" for the bottom region big > enough, but the PDF that results from the generated FO shows no > substantial gap between the body and the border... > > My best regards, > Sergey > > > ----- Original Message ----- From: "Werner Donné" > <wer...@pi...> > To: "USHAKOV, Sergey" <us...@in...> > Cc: <css...@li...> > Sent: Friday, September 16, 2011 11:35 AM > Subject: Re: [css2xslfo-support] Padding for top and bottom regions > > > Hi Sergey, > > The top and bottom regions have a fixed height and always abut on the body > region. This means that whatever you put in them should fit this height. I > would expect padding to work also for top and bottom regions. Perhaps you > can send me the example? > > Best regards, > > Werner. > > On 16 Sep 2011, at 06:48, USHAKOV, Sergey wrote: > >> Hi Werner, >> >> I'm going ahead with my re-exploration of CSSToXSLFO features :) >> >> My next stop was at borders for top and bottom regions. My idea was to >> have >> these regions separated from the body region by visible borders with >> controllable margins and paddings. My idea was also to have all these >> margins/borders/paddings belong to appropriate top/bottom regions rather >> than to the body region for better flexibility. >> >> Everything is perfect wth margins and borders. But I did not succeed with >> paddings. My impression is that CSS attributes for padding are not >> honored >> for top and bottom regions, at least at joints with the body region. >> >> My workaround was adding extra empty 'div' elements to do the job for >> paddings. But cannot say this looks elegant... >> >> Any ideas? >> >> Thanks in advance and best regards, >> Sergey >> >> >> ------------------------------------------------------------------------------ >> BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA >> http://p.sf.net/sfu/rim-devcon-copy2 >> _______________________________________________ >> css2xslfo-support mailing list >> css...@li... >> https://lists.sourceforge.net/lists/listinfo/css2xslfo-support > > -- > http://www.pincette.biz/ > Handling your documents with care, wherever you are. > <test.xhtml>------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > http://p.sf.net/sfu/rim-devcon-copy2_______________________________________________ > css2xslfo-support mailing list > css...@li... > https://lists.sourceforge.net/lists/listinfo/css2xslfo-support -- http://www.pincette.biz/ Handling your documents with care, wherever you are. |