- From: Håkon Wium Lie <howcome@opera.com>
- Date: Tue, 10 Aug 2010 13:32:15 +0200
- To: www-style@w3.org
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; } } 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. Further, the bullet point below states that "the right margin of the left box and the left margin of the right box are treated as if their computed values were 'auto'." -- which saves my use case as it gives the extra space on the sides to the margins of top-left and top-right. 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. Cheers, -h&kon Håkon Wium Lie CTO °þe®ª howcome@opera.com http://people.opera.com/howcome
Received on Tuesday, 10 August 2010 11:33:00 UTC