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

[css3-page] Negative content area in 6.3.3. Margin Box Fixed Dimension

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Sun, 01 Jul 2012 19:35:17 +0200
Message-ID: <4FF08A55.2090100@kozea.fr>
To: www-style@w3.org
Hi,

Consider this example:

   @page {
     margin: 100px;
     @top-left { margin: 60px }
   }

'height' on the margin box computes to 'auto', borders and padding to 
zero. With the current text in 6.3.3, rule 4 applies and the used height 
is -20px.

Is there any other situation where any box can end up with a negative 
used width or height? Do we want this?

I think this kind of case should be avoided. To fix this example, I 
suggest changing rule 2 of 6.3.3

   # If ‘border-top-width’ + ‘padding-top’ + ‘height’ (if it is not
   # ‘auto’) + ‘padding-bottom’ + ‘border-bottom-width’, plus
   # ‘margin-top’ and/or ‘margin-bottom’ if not ‘auto’, is larger than
   # the height of the top page margin, then any ‘auto’ values for
   # ‘margin-top’ or ‘margin-bottom’ are, for the following rules,
   # treated as zero.

and make it also apply to 'height':

   | [...] then any ‘auto’ values for ‘height’, ‘margin-top’ or
   | ‘margin-bottom’ are, for the following rules, treated as zero.


With this change in the example above, rule 3 will apply. The used 
height would be 0 and the used margin-top 40px.

Regards,
-- 
Simon Sapin
Received on Sunday, 1 July 2012 17:35:48 GMT

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