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: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 25 Mar 2015 17:25:22 -0700
Message-ID: <CAAWBYDDV9zQ9qKspo-zG+Zrp=MO4G4cxB5kbJYYxa=HXj+ODjQ@mail.gmail.com>
To: Daniel Holbert <dholbert@mozilla.com>
Cc: Mats Palmgren <mats@mozilla.com>, "www-style@w3.org" <www-style@w3.org>
On Wed, Mar 25, 2015 at 5:13 PM, Daniel Holbert <dholbert@mozilla.com> wrote:
> 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.
> http://dev.w3.org/csswg/css-grid/#abspos-items
> 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.

Yeah, I'm dumb and didn't remember that abspos has magic auto behavior.

This does indeed need to be handled better, so the containing block
gets clamped to zero width, placed at line 2.

Received on Thursday, 26 March 2015 00:26:09 UTC

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