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

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

From: Manuel Rego Casasnovas <rego@igalia.com>
Date: Thu, 22 Jan 2015 23:24:57 +0100
Message-ID: <54C178B9.9050600@igalia.com>
To: www-style@w3.org
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.

Thanks for the information.

So, let me use an example to check if I'm getting the new wording right:
<div style="display: grid;">
  <div style="grid-row: 1; grid-column: 2;">item 1</div>
  <div style="grid-row: 1; grid-column: span 2;">item 2</div>
  <div style="grid-row: 1;">item 3</div>
  <div>item 4</div>
</div>

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

So, even if we're in sparse mode, "item 4" is inserted in the hole of
the first cell. Because of the auto-placement cursor starts in 1,1 in
step "3. Position the remaining grid items".

Just wanted to confirm that this is the expected behavior.

Thanks,
  Rego
Received on Thursday, 22 January 2015 22:25:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:56 UTC