W3C home > Mailing lists > Public > www-style@w3.org > March 2015

[css-sizing] Percentage contributions to intrinsic sizing

From: fantasai <fantasai.lists@inkedblade.net>
Date: Wed, 18 Mar 2015 22:01:43 -0700
Message-ID: <550A5837.9040508@inkedblade.net>
To: "www-style@w3.org" <www-style@w3.org>
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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:30 UTC