Percentages on region margins

2005-08-29 Thread Manuel Mall
I am trying to figure out on which base value to apply the margin="5%" 
on the  (see fragment below):


   
   
...

The margin in the page-master element is obviously based on the 
page-width as there is no further containing block. The percentage on 
the extend="5%" in the  is also relative to the 
page-width as the spec says so: "refer to the corresponding width of 
the page-viewport-area". This leaves the margin on the region-body. My 
interpretation is that the containing block / ancestor area of the 
region-body is the page-reference-area. Its content rectangle would in 
this case have the width (5in - 2*(5in * 0.05)). If my interpretation 
is correct it would mean that in the above example the margins on the 
region-body would be smaller than the extend on the region-before (=> 
not nice). I am concerned because it seems to be somewhat inconsistent 
that the percentage on extent in a region-before is evaluated against a 
different base than the percentage on a margin in a region-body.

I would appreciate if others could cross-check if my interpretation 
seems ok or not.

Thanks

Manuel


Re: Percentages on region margins

2005-08-29 Thread Jeremias Maerki
You probably missed the following:

7.10.1 "margin-top" says for percentages:
> The percentage is calculated with respect to the width of the generated
> box's containing block. This is true for 'margin-top' and 'margin-bottom',
> except in the page context, where percentages refer to page box height.

On 29.08.2005 13:18:59 Manuel Mall wrote:
> I am trying to figure out on which base value to apply the margin="5%" 
> on the  (see fragment below):
> 
>page-width="5in" page-height="5in" margin="5%">
>
>
> ...
> 
> The margin in the page-master element is obviously based on the 
> page-width as there is no further containing block. The percentage on 
> the extend="5%" in the  is also relative to the 
> page-width as the spec says so: "refer to the corresponding width of 
> the page-viewport-area". This leaves the margin on the region-body. My 
> interpretation is that the containing block / ancestor area of the 
> region-body is the page-reference-area. Its content rectangle would in 
> this case have the width (5in - 2*(5in * 0.05)). If my interpretation 
> is correct it would mean that in the above example the margins on the 
> region-body would be smaller than the extend on the region-before (=> 
> not nice). I am concerned because it seems to be somewhat inconsistent 
> that the percentage on extent in a region-before is evaluated against a 
> different base than the percentage on a margin in a region-body.
> 
> I would appreciate if others could cross-check if my interpretation 
> seems ok or not.
> 
> Thanks
> 
> Manuel



Jeremias Maerki



Re: Percentages on region margins

2005-08-29 Thread Manuel Mall
On Mon, 29 Aug 2005 08:20 pm, Jeremias Maerki wrote:
> You probably missed the following:
>
> 7.10.1 "margin-top" says for percentages:
> > The percentage is calculated with respect to the width of the
> > generated box's containing block. This is true for 'margin-top' and
> > 'margin-bottom', except in the page context, where percentages
> > refer to page box height.
>

Thanks for pointing this out - don't you love this spec -:). However, 
that's for a margin specified on a page-master. My uncertainty is with 
a margin specified on a region-body unless you interpret the term "page 
context" as meaning page-master and its subordinate elements in which 
case margins on regions would be resolved relative to the 
page-width/height.

> On 29.08.2005 13:18:59 Manuel Mall wrote:
> > I am trying to figure out on which base value to apply the
> > margin="5%" on the  (see fragment below):
> >
> >  >   page-width="5in" page-height="5in" margin="5%">
> >
> >
> > ...
> >
> > The margin in the page-master element is obviously based on the
> > page-width as there is no further containing block. The percentage
> > on the extend="5%" in the  is also relative to
> > the page-width as the spec says so: "refer to the corresponding
> > width of the page-viewport-area". This leaves the margin on the
> > region-body. My interpretation is that the containing block /
> > ancestor area of the region-body is the page-reference-area. Its
> > content rectangle would in this case have the width (5in - 2*(5in *
> > 0.05)). If my interpretation is correct it would mean that in the
> > above example the margins on the region-body would be smaller than
> > the extend on the region-before (=> not nice). I am concerned
> > because it seems to be somewhat inconsistent that the percentage on
> > extent in a region-before is evaluated against a different base
> > than the percentage on a margin in a region-body.
> >
> > I would appreciate if others could cross-check if my interpretation
> > seems ok or not.
> >
> > Thanks
> >
> > Manuel
>
> Jeremias Maerki

Manuel


Re: Percentages on region margins

2005-08-29 Thread Jeremias Maerki

On 29.08.2005 17:18:18 Manuel Mall wrote:
> On Mon, 29 Aug 2005 08:20 pm, Jeremias Maerki wrote:
> > You probably missed the following:
> >
> > 7.10.1 "margin-top" says for percentages:
> > > The percentage is calculated with respect to the width of the
> > > generated box's containing block. This is true for 'margin-top' and
> > > 'margin-bottom', except in the page context, where percentages
> > > refer to page box height.
> >
> 
> Thanks for pointing this out - don't you love this spec -:). However, 
> that's for a margin specified on a page-master. My uncertainty is with 
> a margin specified on a region-body unless you interpret the term "page 
> context" as meaning page-master and its subordinate elements in which 
> case margins on regions would be resolved relative to the 
> page-width/height.

I agree that this may not be 100% clear but I believe this applies to
the simple-page-master's immediate children, too. I mean we're outside
of the normal block-level stuff and inside the page declaration. It
would really be weird to base these values on anything else than the
page extents.

> > On 29.08.2005 13:18:59 Manuel Mall wrote:
> > > I am trying to figure out on which base value to apply the
> > > margin="5%" on the  (see fragment below):
> > >
> > >  > >   page-width="5in" page-height="5in" margin="5%">
> > >
> > >
> > > ...
> > >
> > > The margin in the page-master element is obviously based on the
> > > page-width as there is no further containing block. The percentage
> > > on the extend="5%" in the  is also relative to
> > > the page-width as the spec says so: "refer to the corresponding
> > > width of the page-viewport-area". This leaves the margin on the
> > > region-body. My interpretation is that the containing block /
> > > ancestor area of the region-body is the page-reference-area. Its
> > > content rectangle would in this case have the width (5in - 2*(5in *
> > > 0.05)). If my interpretation is correct it would mean that in the
> > > above example the margins on the region-body would be smaller than
> > > the extend on the region-before (=> not nice). I am concerned
> > > because it seems to be somewhat inconsistent that the percentage on
> > > extent in a region-before is evaluated against a different base
> > > than the percentage on a margin in a region-body.
> > >
> > > I would appreciate if others could cross-check if my interpretation
> > > seems ok or not.
> > >
> > > Thanks
> > >
> > > Manuel
> >
> > Jeremias Maerki
> 
> Manuel



Jeremias Maerki



Re: Percentages on region margins

2005-08-29 Thread Manuel Mall
On Mon, 29 Aug 2005 11:28 pm, Jeremias Maerki wrote:
> On 29.08.2005 17:18:18 Manuel Mall wrote:
> > On Mon, 29 Aug 2005 08:20 pm, Jeremias Maerki wrote:
> > > You probably missed the following:
> > >
> > > 7.10.1 "margin-top" says for percentages:
> > > > The percentage is calculated with respect to the width of the
> > > > generated box's containing block. This is true for 'margin-top'
> > > > and 'margin-bottom', except in the page context, where
> > > > percentages refer to page box height.
> >
> > Thanks for pointing this out - don't you love this spec -:).
> > However, that's for a margin specified on a page-master. My
> > uncertainty is with a margin specified on a region-body unless you
> > interpret the term "page context" as meaning page-master and its
> > subordinate elements in which case margins on regions would be
> > resolved relative to the
> > page-width/height.
>
> I agree that this may not be 100% clear but I believe this applies to
> the simple-page-master's immediate children, too. I mean we're
> outside of the normal block-level stuff and inside the page
> declaration. It would really be weird to base these values on
> anything else than the page extents.
>

Yes I agree (with the weird bit), that's why I ask the question. So I 
will resolve relative to the page width/height.

> > > On 29.08.2005 13:18:59 Manuel Mall wrote:
> > > > I am trying to figure out on which base value to apply the
> > > > margin="5%" on the  (see fragment below):
> > > >
> > > >  > > >   page-width="5in" page-height="5in" margin="5%">
> > > >
> > > >
> > > > ...
> > > >
> > > > The margin in the page-master element is obviously based on the
> > > > page-width as there is no further containing block. The
> > > > percentage on the extend="5%" in the  is also
> > > > relative to the page-width as the spec says so: "refer to the
> > > > corresponding width of the page-viewport-area". This leaves the
> > > > margin on the region-body. My interpretation is that the
> > > > containing block / ancestor area of the region-body is the
> > > > page-reference-area. Its content rectangle would in this case
> > > > have the width (5in - 2*(5in * 0.05)). If my interpretation is
> > > > correct it would mean that in the above example the margins on
> > > > the region-body would be smaller than the extend on the
> > > > region-before (=> not nice). I am concerned because it seems to
> > > > be somewhat inconsistent that the percentage on extent in a
> > > > region-before is evaluated against a different base than the
> > > > percentage on a margin in a region-body.
> > > >
> > > > I would appreciate if others could cross-check if my
> > > > interpretation seems ok or not.
> > > >
> > > > Thanks
> > > >
> > > > Manuel
> > >
> > > Jeremias Maerki
> >
> > Manuel
>
> Jeremias Maerki

Manuel


Re: Percentages on region margins

2005-08-30 Thread Manuel Mall
On Mon, 29 Aug 2005 11:31 pm, Manuel Mall wrote:
> On Mon, 29 Aug 2005 11:28 pm, Jeremias Maerki wrote:
> > On 29.08.2005 17:18:18 Manuel Mall wrote:
> > > On Mon, 29 Aug 2005 08:20 pm, Jeremias Maerki wrote:
> > > > You probably missed the following:
> > > >
> > > > 7.10.1 "margin-top" says for percentages:
> > > > > The percentage is calculated with respect to the width of the
> > > > > generated box's containing block. This is true for
> > > > > 'margin-top' and 'margin-bottom', except in the page context,
> > > > > where percentages refer to page box height.
> > >
> > > Thanks for pointing this out - don't you love this spec -:).
> > > However, that's for a margin specified on a page-master. My
> > > uncertainty is with a margin specified on a region-body unless
> > > you interpret the term "page context" as meaning page-master and
> > > its subordinate elements in which case margins on regions would
> > > be resolved relative to the
> > > page-width/height.
> >
> > I agree that this may not be 100% clear but I believe this applies
> > to the simple-page-master's immediate children, too. I mean we're
> > outside of the normal block-level stuff and inside the page
> > declaration. It would really be weird to base these values on
> > anything else than the page extents.
>
> Yes I agree (with the weird bit), that's why I ask the question. So I
> will resolve relative to the page width/height.
>

Further to this - what is the expectation if we change the reference 
orientation by 90 degrees (whichever way)? Now margin-top and bottom 
are along the sides and margin-before and after are across (Look at the 
picture in section 6.4.12 under "Constraints applicable to regions" of 
the spec if you don't quite understand what I am talking about.
). Shall we still resolve a percentage on a margin-top/bottom against 
the page-height? Looks awkward to me but couldn't find (that doesn't 
mean there is none) an answer in the spec.

> > > > On 29.08.2005 13:18:59 Manuel Mall wrote:
> > > > > I am trying to figure out on which base value to apply the
> > > > > margin="5%" on the  (see fragment below):
> > > > >
> > > > >  > > > >   page-width="5in" page-height="5in" margin="5%">
> > > > >
> > > > >
> > > > > ...
> > > > >
> > > > > The margin in the page-master element is obviously based on
> > > > > the page-width as there is no further containing block. The
> > > > > percentage on the extend="5%" in the  is
> > > > > also relative to the page-width as the spec says so: "refer
> > > > > to the corresponding width of the page-viewport-area". This
> > > > > leaves the margin on the region-body. My interpretation is
> > > > > that the containing block / ancestor area of the region-body
> > > > > is the page-reference-area. Its content rectangle would in
> > > > > this case have the width (5in - 2*(5in * 0.05)). If my
> > > > > interpretation is correct it would mean that in the above
> > > > > example the margins on the region-body would be smaller than
> > > > > the extend on the region-before (=> not nice). I am concerned
> > > > > because it seems to be somewhat inconsistent that the
> > > > > percentage on extent in a region-before is evaluated against
> > > > > a different base than the percentage on a margin in a
> > > > > region-body.
> > > > >
> > > > > I would appreciate if others could cross-check if my
> > > > > interpretation seems ok or not.
> > > > >
> > > > > Thanks
> > > > >
> > > > > Manuel
> > > >
> > > > Jeremias Maerki
> > >
> > > Manuel
> >
> > Jeremias Maerki
>
> Manuel

Manuel


Re: Percentages on region margins

2005-08-31 Thread Jeremias Maerki
(Just to be clear, you mean reference-orientation on simple-page-master,
right? Not region-body.)

Good question. I can't find any special reference to this case in the
spec. I guess we need to go with the end-user expectation which I
imagine would be that you compensate for the the rotation. But maybe I
miss something.

On 31.08.2005 03:35:43 Manuel Mall wrote:

> Further to this - what is the expectation if we change the reference 
> orientation by 90 degrees (whichever way)? Now margin-top and bottom 
> are along the sides and margin-before and after are across (Look at the 
> picture in section 6.4.12 under "Constraints applicable to regions" of 
> the spec if you don't quite understand what I am talking about.
> ). Shall we still resolve a percentage on a margin-top/bottom against 
> the page-height? Looks awkward to me but couldn't find (that doesn't 
> mean there is none) an answer in the spec.



Jeremias Maerki