W3C home > Mailing lists > Public > www-style@w3.org > June 2012

Re: [css3-page] empty margin boxes

From: fantasai <fantasai.lists@inkedblade.net>
Date: Mon, 11 Jun 2012 18:52:51 -0700
Message-ID: <4FD6A0F3.5070707@inkedblade.net>
To: Håkon Wium Lie <howcome@opera.com>
CC: www-style@w3.org
On 08/10/2010 04:32 AM, Håkon Wium Lie wrote:
> I have a use case for margin boxes that I'd like to ensure is
> supported.
>
> In the top-center margin box, I'd like to have the page number with a
> line underneath it. E.g.:
>
>
>                                   46
>                                 ______
>
> To achieve this, I'm using this code:
>
>    @page {
>      @top-center {
>        content: counter(page);
>        width: 4em;
>        border-bottom: thin solid black;
>      }
>    }

That should work.

> However, one reading of the spec is that the width is not honored. In
> 6.2 [1] one reads:
>
>    "A margin box is instantiated if and only if the computed value of
>    its 'content' property does not match that of its initial value."
>
>    [1] http://dev.w3.org/csswg/css3-page/#populating-margin-boxes
>
> A non-instatiated box cannot have widths, borders, margins, right?
>
> But, in 6.3.2 one reads:
>
>    If a box is empty and its computed width is ‘auto’, then the used
>    values of its left and right padding width and left and right border
>    width are all 0.
>
> which seems to indicate that the box is there, albeit invisible.

It says "If a box is empty", and in this case, it's not empty.

> I do think the draft should be changed to not talk about boxes being
> "instantiated". Instead, we can think of them as being there, but
> invisible in most cases.

I think the intention is to treat them like :before/:after -- they
exist if they have content != none.

~fantasai
Received on Tuesday, 12 June 2012 01:53:23 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:55 GMT