Re: [css-grid] Should resolved value of grid-auto-rows / grid-auto-columns be in pixels?

En 06/03/14 02:27, Daniel Holbert escribiu:
> Hi www-style,
> 
> FACTS:
>  a) The properties "grid-auto-columns" and "grid-auto-rows" take
> <track-size> [1].
> 
>  b) The properties "grid-template-columns" and grid-template-rows *also*
> take <track-size> [2] (in a more complicated syntax).
> 
>  c) The resolved value of grid-template-columns/rows must have the
> <track-size> converted to pixels. [3]
> 
> ...BUT...
> 
>  (d) There is no equivalent requirement for grid-auto-columns/rows.
> 
> Should we require grid-auto-columns/rows to return their resolved value
> in pixels, too? (so that <track-size> has consistent behavior across
> properties)

What we have done in Blink and in WebKit is to return the specified
value for grid-auto-*. The reason is simple, imagine the following
declaration:

grid-auto-columns: 2fr;

you cannot resolve that value to pixels because its value is different
for each extra row added to the grid. It will depend on the track
breadths of the explicit grid and also the amount of implicit (auto)
tracks already added to the grid. So that declaration might mean 100px
for the first auto column, but 20px for the second for example.

I hope we had taken the right decision.

BR

Received on Thursday, 6 March 2014 08:57:24 UTC