Re: [csswg-drafts] [css-grid] Display any element as part of any given grid

Honestly, I also wouldn't like to make this issue too broad by adding more generic concepts like Regions to its scope. I'd rather leave it a Grid-specific issue, since Grids (unlike most other CSS mechanisms) is "container-first", so once a grid is defined, it can potentially create "slots" with the definite size and position for elements that are not loaded yet. And since the structure of the grid is well-defined, I don't see strict reasons why these elements _necessarily have to be direct children_ of the grid container.

The only note regarding the proposed syntax, I don't like identifying the grid by the ID of the element in the source document language. I'd prefer naming grids in CSS only, like in @mrego's example above or something like this:
```
#the_grid {
  display: grid;
  /* Naming the Grid with the CSS identifier, similarly to naming grid areas etc.: */
  grid-name: my-super-grid;
  /* Any additional normal Grid stuff here: */
  grid-template-columns: repeat(2, auto);
}
#the_element {
  /* The new feature — attaching the element to the named grid: */
  grid: my-super-grid; /* or maybe something like 'grid-item-of: my-super-grid' ? */
  /* Other grid placements properties as usually: */
  grid-row: 1;
  grid-column: 2;
}
```

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

Received on Tuesday, 15 May 2018 14:28:53 UTC