W3C home > Mailing lists > Public > www-style@w3.org > July 2014

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 25 Jul 2014 12:45:33 -0700
Message-ID: <CAAWBYDBr5kbc+WRzV5bxWX54AQEQuqUbdU-tGjBeetLGj23O2g@mail.gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: "www-style@w3.org" <www-style@w3.org>
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?

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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:23 UTC