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

Hi,

On 29/03/18 22:09, fantasai wrote:
> 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.
>
>


I think the last option is feasible, form the implementation point of
view, and I think it address the main purpose of serializing computed
values using the repeat notation. Limiting it to same-equal tracks seems
useless to me, I'd rather avoid using repeat notation at all for
serialization. The third option seems too much complex to me.


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

Received on Friday, 30 March 2018 09:12:59 UTC