Re: [css-grid] auto-placement algorithm step 2 doesnt' respect sparse/dense/stack choice

On 22/01/15 20:15, fantasai wrote:
> I'm sorry, we forgot to respond on the list. It seemed like an oversight,
> that the 'sparse' keyword packed things densely if they happened to be
> track-restricted, so we just fixed it.

I've an extra question for elements spanning several rows.

Let's use an example as it's going to be easier to explain:
<div style="display: grid; grid-template-columns: auto auto auto;">
  <div style="grid-row: 1; grid-column: 2;">item 1</div>
  <div style="grid-row: 2; grid-column: 1;">item 2</div>
  <div style="grid-row: 1 / span 2;">item 3</div>
  <div style="grid-row: 1;">item 4</div>
  <div style="grid-row: 2;">item 5</div>
</div>

The items will be placed at:
* item 1: 1st row, 2nd column.
* item 2: 2nd row, 1st column.
* item 3: 1st and 2nd rows, 3rd column.
* item 4: 1st row, 4th column.
* item 5: 2st row, 4th column.

I'm not completely sure about "item 5" position, I think it should be in
the 4th column but the algorithm only talks about "this row", maybe it
should be in the 2nd column:
"Set the row-start line of its placement to the earliest (smallest
positive index) line index that ensures this item’s grid area will not
overlap any occupied grid cells and that is past any grid items
previously placed in this row by this step."

What is the expected behavior?

Thanks,
  Rego

Received on Wednesday, 11 February 2015 15:24:05 UTC