W3C home > Mailing lists > Public > public-css-archive@w3.org > May 2017

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

From: Eric A. Meyer via GitHub <sysbot+gh@w3.org>
Date: Mon, 15 May 2017 15:51:43 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-228760408-1494863501-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 10:12:53 UTC