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

Interesting.

That would make .thing1 and .thing2 get laid out as part of the grid with ID #outer, right? That might fulfil my wish.

Is it a requirement of that proposed feature that #inner is a descendant of #outer? (As their names might imply.)
In the feature I want there'd be no such restriction. The element that gest moved into the given grid could be located *anywhere* in the whole page DOM - it could be part of a sibling tree, or it could even be a grandchild of the given grid. (One obvious restriction would be that you can't place eg the grid itself into that same grid.)

Another aspect: The grid #outer already has a "name" (something to refer to it / a selector), so I'd prefer my syntax where it's not necessary to create an additional name for the grid into which the other element gets moved. eg

```
#some_selector {
  display: grid;
  grid-template-columns: repeat(2, auto);
}
#some_other_selector {
  display-as-grid-item-of: "#some_selector";
  /*
  Where to place it in the grid #some_selector :
  */
  grid-row: 1;
  grid-column: 2;
}
```

But the syntax `display: grid(foo)` with `display: foo` would be OK for me as well if the effect is the same - that the element with `display: foo` gets laid out as grid item of the element which has `display: grid(foo)`, and that it's possible (optionally) to specify the grid-row and grid-column in which the "layout-moved" item should appear (this is crucial - when I move an element into a Grid I need to be able to specify where exactly that Grid item should appear).

Is there a ticket for that other feature/syntax? We should cross-link them.

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

Received on Wednesday, 11 April 2018 11:55:29 UTC