W3C home > Mailing lists > Public > public-css-archive@w3.org > March 2020

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

From: Joshua Lindquist via GitHub <sysbot+gh@w3.org>
Date: Mon, 02 Mar 2020 22:00:05 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-593645186-1583186404-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:02 UTC