W3C home > Mailing lists > Public > www-style@w3.org > August 2015

[css-grid] repeat(auto-fit, <tracks>)

From: fantasai <fantasai.lists@inkedblade.net>
Date: Mon, 31 Aug 2015 22:44:03 +0200
To: "www-style@w3.org" <www-style@w3.org>, Rossen Atanassov <Rossen.Atanassov@microsoft.com>
Message-ID: <55E4BC93.60809@inkedblade.net>
Last week the CSSWG discussed extending the repeat() function in grid layout
to handle this case
and Fran├žois Remy's extension
by introducing the
keywords as repeat values, respectively.

The 'auto-fill' keyword will create as many columns as will fit, and
the 'auto-fit' keyword will create as many columns as will fit, but
also drop any repetitions that are empty after grid item placement
is complete.

I have attempted to edit this resolution into the spec:

One issue that I ran into was the issue of what gets dropped for
auto-fit. It's easy to drop any repeated columns that happen to
be empty. It's less easy to track the repetitions which are empty,
because that's not a simple flag on the column which is empty --
you have to also keep track of which columns form a single repetition.

Anyway, now that we have gutters, I think the vast majority of the
use cases for this feature will be single column widths, not patterns
of varying track sizes, so I suggest that we limit the auto-repeat
patterns to single tracks rather than entire track listings, at least
for this level.

To summarize, the options are:

   A) Allow auto-repeats to repeat entire track listings.
      UAs must track which tracks belong to a repetition in order
      to drop them together when they are completely empty for

   B) Restrict auto-fit repeats to single track sizes.
      UAs need only keep track of whether a track is a repeated
      track, and drop that track if it is itself empty.

   C) Restrict both auto-fit and auto-fill repeats to single
      track sizes. Same as B), except auto-fill and auto-fit
      have the same syntactic restriction.

Thoughts? I have a preference for C, since it is the least amount
of work for implementers and testers and, together with gutters
and the alignment properties, lets us solve probably >95% of the
need for this feature.

Received on Monday, 31 August 2015 20:44:41 UTC

This archive was generated by hypermail 2.3.1 : Monday, 31 August 2015 20:44:41 UTC