Auto margins and shrinkwrapping [css-flexbox][css-grid][css-writing-modes]

(This is mostly a note to myself.)

Issue is wrt auto margins. Note: Margins default to zero.

For auto-sized items, a block-level block will fill its containing
block in the inline dimension. Setting margins to auto has no effect,
it's just like having zero margins. If you make the block smaller
than the containing block by setting an explicit width (or turning
it into a table), then it can be aligned with auto margins.

In flex and grid layout, if you have at least one auto margin, the
item shrinkwraps. Therefore, if its content is smaller than the
container, it can be margin-aligned.

I can't remember what we do with block-level grid and flex containers.
I think we should make them shrinkwrap if either margin is zero,
because that would be useful and make sense and the current behavior
is easy to get by *not doing anything* and getting the default margins
of zero.

This also shows up in orthogonal flows. Currently trying to unravel
that as well, and came to this conclusion, that they should shrinkwrap
if a margin is auto and fill-available otherwise.


Received on Friday, 25 July 2014 19:13:00 UTC