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

Re: [css-align][css-grid] Stretching grid tracks in Content Distribution alignment

From: Javier Fernandez <jfernandez@igalia.com>
Date: Wed, 17 Jun 2015 00:03:55 +0200
Message-ID: <55809D4B.5010603@igalia.com>
To: www-style@w3.org
It'd be awesome to get some feedback on these issues, since some
assumptions were already implemented in Chrome and we'd like to correct
them ASAP if necessary. We are also waiting for this to implement
Content Distribution alignment in WebKit as well.

Thanks.

On 06/08/2015 09:23 AM, Javier Fernandez wrote:
> Hi all,
> 
> I've got some doubts about how to interpreter 'stretch' definition in
> the context of Content Distribution alignment and Grid Layout.
> 
> http://dev.w3.org/csswg/css-align/#valdef-content-distribution-stretch
> "If the combined size of the alignment subjects is less than the size of
> the alignment container, any auto-sized alignment subjects have their
> size increased equally (not proportionally), while still respecting the
> constraints imposed by max-height/max-width, so that the combined size
> exactly fills the alignment container."
> 
> According to the specs, Grid Layout considers grid tracks as the
> alignment subjects for Content Distribution alignment, so the issues I'd
> like to clarify are:
> 
> 1- What actually means an 'auto-sized' grid tack ?
> 2- How to impose max-height/max-width constrains to grid track sizing ?
> 
> For the first question, it's obvious that tracks with size 'auto' are
> clearly candidates for stretching. Last draft version of the Grid Layout
> spec defines 'auto' size s follows:
> 
> http://dev.w3.org/csswg/css-grid/#valdef-grid-template-columns-auto
> "As a maximum, identical to max-content. As a minimum, represents the
> largest minimum size (as specified by min-width/min-height) of the grid
> items occupying the grid track."
> 
> In my initial implementation I considered any 'content-sized' track as
> 'auto-sized', hence candidate to be stretched if alignment style rules
> dictate it. But after some discussion with my colleges, I'm not totally
> sure tracks sized as, for instance, max-content should be stretched. At
> least, I didn't follow that approach for grid items, which only the ones
> with height/width 'auto' can be stretched.
> 
> The second question is related to the lack of a min-width/height,
> max-width/height properties specific for grid tracks. I guess
> minmax(min, max) could be something similar, but since 'auto' is defined
> as well using minmax, and considering that stretch will obviously grow
> track sizes over those limits I'm not sure how the "respecting the
> constraints imposed by max-height/max-width" restriction could apply to
> this scenario.
> 
> --
> javi
> 
> 
Received on Tuesday, 16 June 2015 22:04:48 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:54 UTC