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

Hi all,

I've got some doubts about how to interpreter 'stretch' definition in
the context of Content Distribution alignment and Grid Layout.

"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:

"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.


Received on Monday, 8 June 2015 07:24:28 UTC