- From: fantasai <fantasai.lists@inkedblade.net>
- Date: Wed, 16 Sep 2015 16:57:22 -0400
- To: www-style@w3.org
On 09/16/2015 04:04 PM, François REMY wrote: >>From fantasai [mailto:fantasai.lists@inkedblade.net] >> On 05/07/2015 06:35 PM, Tab Atkins Jr. wrote: >>> On Wed, Feb 11, 2015 at 1:56 PM, François REMY >>> <francois.remy.dev@outlook.com> wrote: >>>> Tab Atkins said: >>>>> Oh! You mean that you may or may not have enough items to fill a >>>>> single line, and if you don't have enough, you'd like the grid to >>>>> only generate as many columns as needed? >>>> >>>> Exactly ^_^ I thought it would be clear with my initial mail: >>>> >>>>> If I want the amount of repetitions to be constrained by a max-width >>>>> constrain AND by the amount of repetitions required to display all >>>>> items of the grid (to preserve the right horizontal centering), then >>>>> I’m out of luck right now. >>> >>> We discussed this, and we agree it's a reasonable use-case. We could >>> perhaps branch the repeat(auto,...) syntax to have two auto keyword, >>> "auto-fill" and "auto-fit", where auto-fit automatically drops empty >>> repetitions after placement but before layout. We'll need to give it >>> some more thought and ask the WG what they think. >> >> To close off on this, the WG resolved to accept this solution, and it is now >> edited into the spec: >> https://drafts.csswg.org/css-grid-1/#repeat-notation >> >> Please take a look and let us know if there's anything else that needs fixing >> (or if we made any mistakes in the edits). >> >> ~fantasai > > Thanks for notying of the spec update. > That looks good to me, overall, though I'm not sure I understand > the "name-repeat" feature. Could you provide an example of how > it's supposed to be used? It's for subgrids. subgrid { grid-column: span 4; grid-template-columns: subgrid repeat(auto-fill, [subgrid-odd] [subgrid-even]); } (That's not a useful example, and it's maybe not necessary to have repetitions inside subgrids, but that's what it's for.) ~fantasai
Received on Wednesday, 16 September 2015 20:57:50 UTC