Re: [csswg-drafts] [css-grid] Property "grid-item-of": display any element as part of any given grid (#2530)

I think this idea is likely to raise major accessibility concerns. The ability to reorder content within a single grid can already cause problems. This suggestion says we should be able to take any item from any grid (or perhaps even from outside all grids) and place it into any other grid. The potential for completely destroying the usefulness of the markup seems rather high.

I also agree that this is not the same as Regions.

I have an alternative syntax to suggest, though it admittedly would not work for Flexbox. Grid already has syntax for naming lines and areas. Instead of declaring `child-of`, could we not just name the grid itself in a similar fashion and then target a specific grid using `grid-column`, `grid-row`, and `grid-area`?

For example:
```
#container {
     display: grid[my-grid];
}

#element {
     grid-column: [my-grid] 2 / 3;
}
```


If using the naming on the `display` property doesn't work, then perhaps using `grid-area` to name the grid would be better?

```
#container {
     display: grid;
     grid-area: my-grid; /* my-grid is now the name of the entire grid */
}
```

That also introduces a potential conflict if "my-grid" is already a grid item of a different grid that has a named grid area that is also called "my-grid". There would have to be a decision of which area is the true "my-grid" and which one is thrown away. 





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

Received on Monday, 2 March 2020 22:00:06 UTC