[css-grid] Implied minimum size and border,padding & margin

Hi,

another doubt regarding how to compute the size of auto tracks. Specs
literally say:

"For auto minimums: If the track has an auto min track sizing function
and the grid container is being sized under a min/max-content
constraint, set the track’s base size to the maximum of its items’
min/max-content contributions, respectively.
Otherwise, set its base size to the maximum of its items’ “min-size
contributions”: the value specified by its respective min-width or
min-height properties (whichever matches the relevant axis) if the
specified size is auto, or else the item’s min-content contribution."

So we either return the min|max-content contribution or the value
specified for the correspondent min-size property. In the case of
min|max-content contribution is pretty clear from the definition[1] that
we should include border, padding and margin. But in the case of
returning the value specified by min-height|width the specs does not say
anything. In Blink/WebKit we're adding them too in that case just for
coherency with the other case, but wanted to double check it with the
working group.

BTW we're always using items' border, paddings and margins to compute
the sizes of content-sized tracks (or when computing alignment). That is
not explicitly mentioned in the specs either but I guess is the right
thing to do. Isn't it?

BR

[1] https://drafts.csswg.org/css-sizing-4

Received on Wednesday, 30 March 2016 09:14:14 UTC