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

On Fri, Jul 25, 2014 at 12:12 PM, fantasai
<fantasai.lists@inkedblade.net> wrote:
> (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,

s/zero/auto/, surely?

~TJ

Received on Friday, 25 July 2014 19:46:20 UTC