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

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.

~TJ

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