Re: [css-grid] Sizing of grid containers

On 02/07/2014 07:27 AM, Simon Sapin wrote:
> Hi,
>
> After careful reading of the Grid spec, it’s unclear to
> me how the used width and height of a grid container is
> determined, especially when they compute to 'auto'.

OK, we've added some text about this:

   # A grid container is sized using the rules of the
   # formatting context in which it participates.
   # As a block-level box in a block formatting context,
   # it is sized like any other block-level box that
   # establishes a formatting context, and as an
   # inline-level box in an inline formatting context it
   # is sized as an atomic inline-level box (such as an
   # inline-block). In both inline and block formatting
   # contexts, the grid container’s auto block size is
   # its max-content size.

I've stashed it currently in the Grid Containers section
   http://dev.w3.org/csswg/css-grid/#grid-containers
but if there's a better place, let me know...

The Block & Inline Layout spec should be defining most
of this, I think, in terms generic enough to handle all
formatting context roots, but maybe this is ok for now.

> (Same for auto margins, btw.)

The margins of a box are determined by the formatting
context in which it participates, so that's not really
the job of the Grid spec... It needs to handle grid
item margins, not its own.

~fantasai

Received on Friday, 18 April 2014 16:26:01 UTC