Re: [css-grid] Doubts on worthiness of grid-auto-flow:stack

On 16/09/14 20:56, Tab Atkins Jr. wrote:
> I just slightly reworked the auto-placement algorithm to define the
> behaviors of the three placement algorithms separately, and I've come
> to the conclusion that "stack" is a lot of difficulty for no benefit.
> 
> We originally created "stack" as an attempt to define a slightly
> better version of the old "just put everything in 1/1" behavior.
> Instead, it goes and finds the first *empty* slot, and puts everything
> there; if you're not putting anything in 1/1, it'll have the same
> behavior.  It's a little more complex than that to handle things with
> a definite column position, though.
> 
> Having freshly written the algo, I just don't think it pulls its
> weight.  It's still a terrible value, doing something you don't
> actually want it to do.  It only exists to hopefully handle IE's
> legacy content that depended on "auto-placing" things in 1/1, but it
> might not even do that (if a page is currently positioning something
> in 1/1 *and* depending on auto-placement to put more things there).  I
> think we should just throw away "stack", add "none" with the behavior
> that puts everything in 1/1 if its position is fully auto (and does a
> simple "dense" packing for things that are auto in only one
> dimension).  This would then prevent IE from having to make a
> proprietary value for their old behavior, as we'd just match it.
> 
> Thoughts?

Lately I've been implementing the last bits of auto-placement algorithm
in Blink and WebKit, I even have a patch almost ready for "stack".
However, I agree with you, probably the best idea is to come back to
"none" (maybe adding again "grid-auto-position" if we think it's needed).

Right now I cannot think in a use case for stack algorithm with the 3
"different" behaviours depending on the positions defined or not for the
item:
* Definite row: It'll use "dense" algorithm.
* Definite column: It'll find an empty cell in that column and stack all
items of that column there.
* Fully auto-placed: It'll find an empty cell in the whole grid and
stack all auto-placed items there.

My 2 cents,
  Rego

Received on Wednesday, 17 September 2014 11:32:59 UTC