Re: [css-grid] Doubt about grid-auto-flow stack

On 15/07/14 23:12, Tab Atkins Jr. wrote:
> On Tue, Jul 15, 2014 at 1:27 PM, Manuel Rego Casasnovas <rego@igalia.com> wrote:
>> Hi,
>>
>> I've a doubt regarding stack value in grid-auto-flow property.
>>
>> Let's use a simple example to illustrate it. We have a 2x2 grid with
>> grid-auto-flow stack that contains 3 items:
>> * A with grid-row: 1 and grid-column: 1.
>> * B and C with grid-row: auto and grid-column: auto.
>>
>> B and C would be both stacked on row 1 and column 2.
>>
>> However, I'd like to confirm what happens if we have another item with
>> grid-row: 2 and grid-column: auto.
>> IMHO it would be considered an auto-placed item and be stacked on row 1
>> and column 2 too (somehow ignoring the grid-row: 2 property).
>>
>> Is it right?
> 
> I think it technically is right, but it shouldn't be.  The special
> "stack" behavior should only affect things that are auto in both
> dimensions, I think.

If it doesn't affect items with one defined demission like the one in
the example with grid-row: 2 and grid-column: auto.

Where these items should be placed?
A) In the first column on row 2.
B) In the first empty cell on row 2.

If the answer is B), what would happen if we have more items with the
same properties (grid-row: 2 and grid-column: auto)?

As we're in stack mode I guess they should be placed in the same cell
than the previous one. This implies, that we should somehow store the
position where the previous item has been inserted in row 2. And the
same for the rest of the rows/columns (one auto-placement cursor per
row/column).

Bye,
  Rego

Received on Wednesday, 16 July 2014 10:03:33 UTC