W3C home > Mailing lists > Public > www-style@w3.org > March 2015

Re: [css-grid] Containing block for abs.pos. grid items when the grid overflows

From: Daniel Holbert <dholbert@mozilla.com>
Date: Wed, 25 Mar 2015 17:13:58 -0700
To: "Tab Atkins Jr." <jackalmage@gmail.com>, Mats Palmgren <mats@mozilla.com>
Cc: "www-style@w3.org" <www-style@w3.org>
message-id: <55134F46.9040903@mozilla.com>
On 03/25/2015 04:03 PM, Tab Atkins Jr. wrote:
> The behavior falls out of the placement definitions.  The abspos has
> one line for its placement - its column-start is 2.  Its default span
> is 1, per spec, so its column-end gets computed to 3.

I think it's a bit trickier than that.

For a normal grid item, "grid-column:  2 / auto" would indeed give us a
span of 1. But I don't think that's true of an abspos item -- there, the
spec says:

 # "auto" [...] contributes the corresponding
 # padding edge of the grid container as a line.

So the spec says this item's containing block starts at grid-line 2, and
ends at the right edge of the grid container's padding-box.  So, its
containing block has a negative width.

Received on Thursday, 26 March 2015 00:14:29 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:52 UTC