You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Finn Bock <bc...@worldonline.dk> on 2004/02/08 22:03:57 UTC
Percentages
Hi,
I just uploaded a patch which add support for percentages and
calculations on percentages to bugzilla.
I don't think that the patch is quite right in its attempt to find the
correct base length to combine with the percentage. Some of my confusion
comes from the fact that I can't tell the different boxes/areas/blocks
apart.
How f.ex. are these specifications different:
- ipd of closest area generated by a block-level fo
- width of containing block
- ipd of closest ancestor block-area.
Perhaps somebody who understand the spec better then me can describe
what boxes and sizes that are to used.
I went through the spec and came up with these descriptions of the bases
for the properties that support percentage:
top, bottom, height, max-height:
height of containing block if explicit. Auto otherwise.
left, right, padding-*, margin-[left,right],
max-width, min-width, width, text-indent:
width of containing block
background-position-horizontal, background-position-vertical:
Size of padding-rectangle. Relative values.
font-size:
inherited font-size.
margin-[top,bottom]:
width of containing block, except for page context where it
is page box height.
[start,end]-indent:
ipd of containing reference-area.
space-[end,start], line-line-end-indent:
ipd of closest ancestor block-area.
alignment-adjust:
'height' if fo:external-graphics or fo:instream-foreign-object,
'font-size' if fo:character and 'line-height' otherwise.
baseline-shift:
'line-height' of the parent-area.
block-progression-dimension:
corresponding dimension of closest area generated by a
block-level fo.
Auto if not specified explicit.
content-[height,width]
intrinsic height and width
inline-progression-dimension:
corresponding dimension of closest area generated by a
block-level fo.
Auto if not specified explicit.
min-height:
height of containing.
line-height:
'font-size'
leader-pattern-width, leader-length:
ipd of content-rect of parent area.
column-gap:
width of region being divided into columns.
extent:
corresponding height or width of the page.
column-width:
width of table.
text-altitude, text-depth:
fonts em-height.
provisional-label-seperation, provisional-distance-between-starts:
ipd of closest block-area that is not a line-area
vertical-align:
'line-height'
regards,
finn
Re: Percentages
Posted by Finn Bock <bc...@worldonline.dk>.
[Simon Pepping]
> Quite a piece of work. I will try to understand it.
>
> A small correction:
>
>>margin-[top,bottom]:
>> width of containing block, except for page context where it
>
> ^^^^^
> height (I suppose).
Well, not according to the spec:
http://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#margin-top
(my patch does not deal with the block-width / page-height issue
correctly btw).
regards,
finn
Re: Percentages
Posted by Simon Pepping <sp...@leverkruid.nl>.
Quite a piece of work. I will try to understand it.
A small correction:
On Sun, Feb 08, 2004 at 10:03:57PM +0100, Finn Bock wrote:
> margin-[top,bottom]:
> width of containing block, except for page context where it
^^^^^
height (I suppose).
Regards, Simon
--
Simon Pepping
home page: http://www.leverkruid.nl