Bugzilla – Bug 16906
Resolved values (getComputedStyle) of grid-rows / grid-columns should not depend on layout or the element's children
Last modified: 2014-04-18 16:41:04 UTC
The CSS3 Grid ED currently says this about the grid-rows & grid-columns properties' computed style:
# 6.5.2. Computed Values for Grid-rows and Grid-columns
# The computed size of all Grid tracks as returned for the ‘grid-rows’ and
# ‘grid-columns’ properties are normalized to used pixel values. All Grid
# tracks are included in the computed value reported for ‘grid-rows’ and
# ‘grid-columns’ regardless of how the Grid tracks were created, e.g.
# implicit tracks may be created by Grid items referencing a Grid line not
# explicitly defined by a ‘grid-rows’ or ‘grid-columns’ property.
So: that defines the computed style of these properties in such a way that they depend on the children's computed styles. (the grid items)
That's problematic -- per CSS21 "Computed values" definition, the computed value never requires layout and is also what gets inherited (so it's a bit circular to have it influenced by the children).
I believe this chunk of the CSS Grid spec intends to refer to the "Used value", not the "Computed value".
From discussing this with Phil / Markus / fantasai today, I believe the intention was that this chunk of spec is supposed to be about "the value returned by getComputedStyle". Note that getComputedStyle sometimes returns "used values" and sometimes returns "computed values", as noted here:
I'm not sure how kosher it is for CSS3-grid to define specifically what it wants getComputedStyle to return for a particular property, though (or how useful that'd be in this case, for that matter).
Perhaps this chunk of the spec can just be dropped?
(assuming this should be assigned to Phil)
This has been resolved as WONTFIX, since MSFT has use cases and dependent content on getComputedStyle returning the used values of these properties.
However, the spec has been clarified to use the correct terminology for that, and not conflate resolved and computed values.