This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 16906 - Resolved values (getComputedStyle) of grid-rows / grid-columns should not depend on layout or the element's children
Summary: Resolved values (getComputedStyle) of grid-rows / grid-columns should not dep...
Status: RESOLVED WONTFIX
Alias: None
Product: CSS
Classification: Unclassified
Component: Grid Layout (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Phil Cupp
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-02 03:43 UTC by Daniel Holbert
Modified: 2014-04-18 16:41 UTC (History)
2 users (show)

See Also:


Attachments

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.