W3C home > Mailing lists > Public > www-style@w3.org > April 2013

Re: [CSSWG][css-grid-layout] Updated WD of CSS Grid Layout

From: Ojan Vafai <ojan@chromium.org>
Date: Sat, 20 Apr 2013 11:13:53 -0700
Message-ID: <CANMdWTttqmAWp16X75MyNKh9izCvzEcCP4-GXX4g6A-oSFGRHA@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: fantasai <fantasai.lists@inkedblade.net>, Julien Chaffraix <jchaffraix@google.com>, Elliott Sprehn <esprehn@google.com>, "www-style@w3.org" <www-style@w3.org>
On Fri, Apr 19, 2013 at 5:38 PM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> On Fri, Apr 19, 2013 at 4:53 PM, Ojan Vafai <ojan@chromium.org> wrote:
> > I find the position-each-edge model impossible to wrap my head around, as
> > does basically everyone I talk to. The syntax used to be easy to
> understand
> > and is now totally inscrutable. I understand the working group has
> discussed
> > this at length, but this seems like a big step backwards. I don't think
> web
> > developers will get it.
> >
> > Maybe there's some syntax that could make the position-each-edge model
> > intuitive, but this is not it.
> Using grid-row and grid-column gives you back the old model, with a
> slightly different syntax.  (Rather than "grid-row: 2; grid-row-span:
> 3;", you right "grid-row: 2 / span 3;", but that's it.)
> > Here's a few things I find confusing:
> > - grid-start: -1 means the grid item will go *after* the last explicitly
> > positioned cell, but grid-end: -1 means it will go *in* the last
> explicitly
> > positioned cell.
> If this is confusing, it's because you're thinking of the numbers as
> referring to columns/rows, rather than lines between the tracks.
> With grid-start:-1, you're putting your start edge on the last line.
> With grid-end:-1, you're putting your end edge on the last line.

I understand how it works. I'm saying it's confusing and not something most
developers will get. Most developers will think of the numbers as referring
to columns/rows and will be confused by this syntax.

> > - grid-column: 1/2 and grid-column: 1/1 go in the same cell.
> This is just error handling.  grid-column:1/3 is different than those.

I think this is the wrong error handling. 1/1 should just compute to
auto/auto. Having 1/1 and 1/2 do the same thing confuses the model. It's
like it's halfway between lines and positions. If we're going to have this
position-each-edge model, we should force people to use it correctly so
that they have to understand the model to get anywhere.

> > - grid-column: span 1 / 4...I still can't figure out what that's
> supposed to
> > do.
> The first value goes to grid-start, the second goes to grid-end.  So
> it attaches its end edge to line 4, and spans 1 column.

OK, now I understand the spanning syntax, but I still think it's totally
inscrutable. "span 2" doesn't make sense to me as a value for grid-start,
etc. As it's not actually an edge. It's implicitly relative to some other
edge. Now that we've talked it through, I get it. But, again, I don't think
web developers will get this. It's bad if the syntax needs the authors of
the spec to explain it to you.

Can someone write up a summary of what we gain by using the
position-each-edge model? I'm having trouble seeing any benefits.
Received on Saturday, 20 April 2013 18:14:41 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:28 UTC