Re: [css-grid] Content-size tracks and orthogonal flows

On 02/10/2014 01:47 PM, Simon Sapin wrote:
> (Again, with a proper Subject line. Sorry about the earlier message.)
>
> Hi,
>
> In the current ED, the "top-level" of the Grid Track Sizing Algorithm is:
>
>> Call ComputedUsedBreadthOfGridTracks for Grid Columns to resolve
>> their logical width.
>>
>> Call ComputedUsedBreadthOfGridTracks for Grid Rows to resolve their
>> logical height. The logical width of Grid Columns from the prior step
>> is used in the formatting of Grid items in content-sized Grid Rows to
>> determine their required height.
>
> As far as I understand, the idea is that the min-content and max-content keywords are truly intrinsic (can be resolved based
> solely on the content of the grid item) in the inline direction, but for the block direction they require actual layout and
> therefore depend on the used logical width of the grid item.
>
> However, this only works if the grid item and grid container have "parallel" writing modes. (Ie. both vertical or both
> horizontal.) What happens if a grid item is an "orthogonal flow"? (As defined in css-writing-modes.)

If it's an orthogonal flow, then it's laid out according to the orthogonal
flow rules, resulting in an intrinsic inline size. This is used to calculate
the column widths. Then we follow up by calculating the row widths. If this
causes a change in the row height available to the orthogonal item (for
example, a row height that was a flexible height ends up smaller than the
size used for the orthogonal flow sizing), then we cycle back (once) and
recalculate everything.

At least, that's the theory. I'm not sure it's correctly explained in the
spec yet. :/ (Also not 100% sure this is the right way to go, but it's
what Microsoft had specified and I don't have an alternative proposal.)

>> If the minimum content size of any Grid item has changed based on
>> available height for the Grid item as computed in step 2, adjust the
>> min content size of the Grid item and restart the Grid track Sizing
>> algorithm (once only).
>
> Conversely, the only case I can imagine this happening is if the grid
> item is an orthogonal flow. Are there other cases?

Wrapped column flexboxen. Multicol.

~fantasai

Received on Friday, 19 December 2014 20:39:26 UTC