Re: [csswg-drafts] [css-grid-2] resolving line names in subgrids (#2564)

> If they're not visible, it'll anchor its grid-column-end to line 3 (the last visible "a" line), then span to line 1, for a final position of 1 / 3. This is the correct/intended behavior.)

Right, they're not visible, so `1 / 3` is indeed correct for your example.

> ISSUE 4: [...] Named areas don't really "exist" in Grid; they're just a shorthand syntax for adding *-start and *-end line names to the grid.

The names in `grid-template-areas` specifies which **tracks** are covered by an area, the `-start/-end` lines are byproduct of that...

>  (Note that you can use grid-area: a solely by manually adding a-start/a-end lines to the grid, avoiding grid-template-areas entirely.)

Indeed, and in a non-subgrid world I would agree that they are entirely equivalent.  However, in a subgrid world, a subgridded axis "shares" the tracks with its parent grid so it seems logical to me that the names in the parent `grid-template-areas` are shared by the subgrid for the slice of the area that the subgrid covers.  Here's a simpler example:
```html
<div style='display:grid; grid-template-areas: "a a a a a"'>
  <div style="display:grid; grid:auto/subgrid; grid-column:2/span 3">
    <x style="grid-column:a-start">x</x>
  </div>
</div>
```
I think the `<x>` item should start at line 1 in the subgrid, because the subgrid's first track is in the "a" area (i.e. the second track in the parent grid) and thus it sees an `a-start` at line 1 since the "a" area, from its perspective, starts there.  You're suggesting that since the parent's `a-start` is outside the subgrid it's invisible, hence it resolves the same as "`grid-column:foo`" which gives the result `3 / 4`, so it doesn't give the same result. It seems we agree that `a-start` should match the first line in the subgrid though. I just don't understand how you get that result with your explanation. Could you elaborate?

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

Received on Thursday, 3 October 2019 21:22:06 UTC