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.

    inherited font-size.

    width of containing block, except for page context where it
    is page box height.

    ipd of containing reference-area.

space-[end,start], line-line-end-indent:
    ipd of closest ancestor block-area.

    'height' if fo:external-graphics or fo:instream-foreign-object,
    'font-size' if fo:character and 'line-height' otherwise.

    'line-height' of the parent-area.

    corresponding dimension of closest area generated by a
    block-level fo.
    Auto if not specified explicit.

    intrinsic height and width

    corresponding dimension of closest area generated by a
    block-level fo.
    Auto if not specified explicit.

    height of containing.


leader-pattern-width, leader-length:
    ipd of content-rect of parent area.

    width of region being divided into columns.

    corresponding height or width of the page.

    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


regards, finn

Reply via email to