Bug 16906 - Resolved values (getComputedStyle) of grid-rows / grid-columns should not depend on layout or the element's children
Resolved values (getComputedStyle) of grid-rows / grid-columns should not dep...
Status: RESOLVED WONTFIX
Product: CSS
Classification: Unclassified
Component: Grid Layout
unspecified
All All
: P2 normal
: ---
Assigned To: Phil Cupp
public-css-bugzilla
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-02 03:43 UTC by Daniel Holbert
Modified: 2014-04-18 16:41 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Holbert 2012-05-02 03:43:33 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.

http://dev.w3.org/csswg/css3-grid-layout/#computed-values-for-grid-rows-and-grid-c

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

http://www.w3.org/TR/CSS21/cascade.html#computed-value
http://www.w3.org/TR/CSS21/cascade.html#inheritance

I believe this chunk of the CSS Grid spec intends to refer to the "Used value", not the "Computed value".
Comment 1 Daniel Holbert 2012-05-02 03:54:13 UTC
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:
   http://lists.w3.org/Archives/Public/www-style/2010Feb/0093.html

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?
Comment 2 Daniel Holbert 2012-05-02 03:58:29 UTC
(assuming this should be assigned to Phil)
Comment 3 fantasai 2014-04-18 16:41:04 UTC
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.