[csswg-drafts] [css-grid] Proposal: Ability to name grids and reference them from subgrids

meyerweb has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-grid] Proposal: Ability to name grids and reference them from subgrids ==
As part of the subgrid discussion, I feel it could be very useful to name grids and reference them elsewhere.  Here’s a quick top-of-mind rough sketch:

```
body {display: grid; grid-name: toplevel;
     grid-template-columns: 1fr repeat(12, min-content) 1fr;
     grid-gap: 0.5em;
     }
#main section.modules > :nth-child(1) {display: subgrid toplevel;
     grid-column: 2 / 4;
     }
#main section.modules > :nth-child(2) {display: subgrid toplevel;
     grid-column: 4 / 6;
     }
```

This would sidestep the need to `display: subgrid` every element along a DOM branch.  There’s precedent for naming things that are referenced elsewhere (e.g., keyframe animations) so the idea isn’t alien, though the syntactical approach here might be.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1375 using your GitHub account

Received on Monday, 15 May 2017 15:51:50 UTC