W3C home > Mailing lists > Public > public-css-archive@w3.org > November 2019

Re: [csswg-drafts] [css-grid] Resolved values of grid-template-rows/columns don't round-trip (#4475)

From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
Date: Fri, 01 Nov 2019 20:48:31 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-548945412-1572641310-sysbot+gh@w3.org>
I think being able to define which grid line is the number 1 might have its usecases other than this, e.g. if you have 3 columns with `auto min-content max-content` but is there is enough space you want to add some spacing before the first column and after the last one. If you use `grid-template-columns: 1fr auto min-content max-content 2fr` then you have to alter the integer indices in placement properties. You can use `grid-auto-columns: 2fr 1fr` and place `::before` and `::after` in implicit tracks, but it looks a bit dirty. `grid-template-columns: 1fr [1] auto min-content max-content [-1] 2fr` seems easier and more elegant.

However, something like this would probably need some thought and should target css-grid-3 instead of css-grid-1, but for `getComputedStyle` we need to fix css-grid-1.

So choosing (1) sounds reasonable. But if in the future we end up adding (2), then it will be sad if now we choose (1), because we will be preventing authors from knowing the used size of the implicit tracks.

-- 
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4475#issuecomment-548945412 using your GitHub account
Received on Friday, 1 November 2019 20:48:33 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:56 UTC