Re: [csswg-drafts] [css-grid] Implicit named grid areas don't work properly with indexes

> But these do not work:

Correct and intentional. The "area" syntax was designed explicitly with the assumption that there's only a single area of a given name.  There's no good notion of what the "third area named icon" is in a 2d context; while we could just evaluate each axis independently, that's not guaranteed to match up with your actual intended areas at all!

For example, imagine that one "icon" area is in the upper-right of the grid, and another is in the lower-left. Using `grid-area: icon` will actually place the item in the *upper-left*, because that's the result of finding the first icon-start and icon-end line in each axis. The area syntax is not designed to handle multiple areas with the same name, and it fundamentally *can't* be designed that way without reifying the notion of areas separate from lines, which we purposely avoided doing.

There are some cases where you can imagine this working "correctly" (such as in your example in the OP), but there's no guarantee of it unless we change the underlying model significantly, which I don't think we should do.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3242#issuecomment-432550139 using your GitHub account

Received on Wednesday, 24 October 2018 07:49:49 UTC