[css-sizing] Percentage contributions to intrinsic sizing

Suppose an item is shrink-to-fit, so we need to calculate its intrinsic sizes.
Inside the item are some other boxes with percentage margins/padding.
We can

   A) Back-compute the percentages:
        - percentages contribute to the intrinsic size
        - once the item is sized, the percentages are honored in layout

   B) Treat percentages as zero:
        - percentages contribute zero to the intrinsic size
        - once the item is sized, the percentages are still treated as zero

   C) Be inconsistent:
        - percentages contribute zero to the intrinsic size
        - once the item is sized, the percentages are honored in layout

Browserwise, we have one implementation of A and two of C.

It is easiest to settle on C, but C leads to overflow, which is imho a
Problem, since a large part of the point of intrinsic sizes is to avoid
overflow.


The same problem for widths (but, IIRC, not for min-widths?) is
Web-content-dependently C for block layout and A for table layout.
Which behavior do we want for Flex and Grid layout?

Sub-problems therefore are:

   0a. widths in block layout = C
   0b. widths in table layout = A

   1. margins/padding in Block layout
   2. widths, margins, padding in Flex and Grid layout
   (3. min-widths in Block layout?)

~fantasai

Received on Thursday, 19 March 2015 05:02:19 UTC