W3C home > Mailing lists > Public > www-style@w3.org > March 2014

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

From: Sergio Villar Senin <svillar@igalia.com>
Date: Thu, 06 Mar 2014 09:56:52 +0100
Message-ID: <53183854.5050504@igalia.com>
To: www-style@w3.org
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:20 UTC