Re: [csswg-drafts] [css-grid][cssom] Disallow repeat() syntax in grid-template-rows/columns resolved values

OK, I didn't care which way this went, but the resolution above isn't valid. You can't serialize a specified value of 'repeat(5, auto)' using repeat syntax, because we're serializing the used value of the track size and unless all your items are the same size, `repeat(5, auto)` isn't going to yield five tracks with identical pixel sizes that can be collaped as `repeat(5, 25px)` or whatever.

We _can_ have `getComputedStyle` use `repeat()` syntax according to some set of collapsing rules, but we _can't_ make it mirror the structure of the specified style. Keeping in mind that we are serializing the _used value_ here, the options here are:

- Don't use `repeat()` in serialization. Easy, not nice for scaling up to giant grids.
- Use `repeat()` in serialization to collapse any sequence of identically-sized columns. Simplest option.
- Use `repeat()` in serialization to collapse any sequence of identically-sized columns only if they happen to be sourced from the same specified `repeat()`. NOTE: A specified `repeat()` can be split into a sequence of multiple serialized `repeat()`s and/or externally-listed sizes if the repeated track list contains sizes that are not `<length-percentage>`. E.g. `20px repeat(6, auto)` can serialize out as `20px repeat(2, 20px) 35px repeat(3, 19px)` if that is what the track sizes end up as.
- Some other option which is less aggressive than the previous, e.g. only collapse columns if they're in a `repeat()` that only contains `<length-percentage>` track listings.

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

Received on Thursday, 29 March 2018 20:09:55 UTC