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

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 UTC