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

> you could use any type of selector, eg class names you mentioned

I considered a component case where class names are dynamically generated by the component code, so I wouldn't know them in advance (but would have some control over the CSS inside the components). In this case, the selector-based approach would be too limiting for me.

> Every CSS implementation supports selectors

But not as property _values_ (except that very limited and still mostly theoretical ID-only case of `nav-up` etc. mentioned by @tabatkins). CSS has a very limited set of value types it can interpret. Extending this set is not so easy as it might seem.

> it's better not being required to write a line that's not necessary

Agree, but there are valid cases where I strongly feel it _is_ necessary. Also, the ability to name grids was already requested as a separate feature. If e.g. the syntax ends up with something lilke `.my-element { display: grid(my-super-grid), grid(another-grid); }` (and comma-separated set of `grid` declarations following the pattern of multiple `background` values), then naming the exact grid becomes necessary and wouldn't require extra line in the same time. Maybe ideally we could have both options at some point? :)

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

Received on Thursday, 17 May 2018 09:59:57 UTC