W3C home > Mailing lists > Public > www-style@w3.org > February 2013

Re: [css3-page] "Tree order" (default stacking order) of page-margin boxes

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Thu, 28 Feb 2013 11:39:47 +0100
Message-ID: <512F33F3.9090703@kozea.fr>
To: fantasai <fantasai.lists@inkedblade.net>
CC: "www-style@w3.org" <www-style@w3.org>
Le 27/02/2013 23:02, fantasai a ťcrit :
> Forwarding Murakami-san's reply...
> MURAKAMI Shinyu wrote:
>> fantasai wrote:
>>> I am curious, what does Antenna House do, and is there a good logic
>>> for it?
>> I don't have a good logic, but currently our formatter's
>> painting order for the margin boxes depends on the order
>> of the margin at-rules.
>> For example,
>> @page {
>>    @top-left   { content: "TL" } /*1*/
>>    @top-center { content: "TC" } /*2*/
>>    @top-right  { content: "TR" } /*3*/
>> }
>> and
>> @page {
>>    @top-right  { content: "TR" } /*1*/
>>    @top-left   { content: "TL" } /*2*/
>>    @top-center { content: "TC" } /*3*/
>> }
>> (I found AH's painting order is reversed (3,2,1).
>> possibly our mistake.)

We could define something like this, although itís a bit more complex 
than it seems because individual margin rules do not generate margin 
boxes. Multiples rules can match the same box, and they cascade.

But Iím not if favor of doing this: itís unprecedented in CSS to have 
the order of rules affect layout, other than through changing the 
outcome of the cascade. Also Murakami-sanís "I don't have a good logic" 
implies that this is an implementation "accident" rather than by design.

We also discussed on the call having the default order depend on the 
'direction' or 'writing-mode' properties. This adds complexity but, IMO, 
does not help much. The stacking order of page-margin boxes only matters 
when they overlap, which should only happen in rare and pathological 
cases anyway. When that happens accidentally, the result looks broken 
whatever the stacking order is.

Therefore I stick to my proposal: pick an arbitrary but fixed default 
order, and let authors control it with z-index for pathological cases. I 
donít care what the default order is.

I donít feel strongly about the "fixed" part, though. If someone thinks 
it should really depend on direction/writing-mode Iím fine with that. 
Please make a proposal in that case.

Simon Sapin
Received on Thursday, 28 February 2013 10:40:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:26 UTC