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

> When naming a grid you're always binding it to an element, right?

Strictly speaking, not necessarily. IMO, the biggest advantage of the whole approach is that the grid can be defined absolutely anywhere, e.g. inside the `@page` rule or even with some dedicated @-rule like `@grid my-super-grid { /* grid properties here */ }` introduced by some future CSS extensions.

> That selector can get broken just as well, right?

Less likely. With named grid, I don't have to bother about the DOM relations between the place where the Grid is  defined and the element I want to place onto it at all. The proposed approach opens the possibility to completely decouple the visual structure from the DOM structure, and relying to DOM relations (in form of selectors) seems to be kind of step back to me.

> CSS selectors are implemented already.

But parsing CSS values as _arbitrary_ selectors is not yet. It might be "not technically true" again, but even implementing the ID-limited case mentioned above by @tabatkins seems to be [rather problematic](https://bugs.chromium.org/p/chromium/issues/detail?id=614003).

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

Received on Wednesday, 16 May 2018 09:40:54 UTC