[csswg-drafts] [css-sizing] need to be clear about inputs to computation of min-content, max-content, and fit-content sizes

dbaron has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-sizing] need to be clear about inputs to computation of min-content, max-content, and fit-content sizes ==
Prior to the presence of orthogonal flows introduced by css-writing-modes, `min-content` and `max-content` sizes were a function only of an element and its descendants (their content and their styles, though excluding the (`min-`/`max-`/)(`width`/`height`) properties on the element itself).  The `fit-content` size is derived from these sizes, but is also a function of an additional input that is provided (an "available width").

To accomodate orthogonal flows, this has changed so that these sizes are a function of a width in the opposite dimension.  For example, the min-content width is now a function of an available height, since if the content is in a vertical writing mode it needs to lay out at that available height to determine the resulting layout width.

css-sizing-1 should be clearer about these concepts requiring this external input and not being purely a function of the content.  This is important because every spec that *uses* these concepts needs to provide this input.  Then, all of the other specs that refer to these concepts need to say what inputs they are providing.  (To provide a random example, the [definition of min-content main size](https://drafts.csswg.org/css-flexbox-1/#ref-for-min-content%E2%91%A1) in flexbox says it depends on the min-content contributions of the flex items, but it doesn't say what cross-size is used as the available width input to that computation.)

Furthermore, it's not clear to me that this is the only input.  These concepts may also require a containing block size in one or both dimensions to be provided in order to allow percentage sizes to be resolved.  (The containing block size may be different from the available size in the dimension in which the available size is provided.)  For example,, when performing layout of horizontal text within an available width, the height resulting from that layout depends on how percentage heights and widths are resolved.  It's not clear to me if some of the users of these intrinsic sizes require these percentages to be resolved against something nonzero or whether layout-based intrinsic size calculations should work like traditional intrinsic size calculations by treating percentage sizes as zero.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2890 using your GitHub account

Received on Friday, 6 July 2018 08:40:15 UTC