Skip to content

Commit 4646eb1

Browse files
committed
[css-grid] Per task force discussion, keep getComputedStyle() returning used values for grid-template-rows/columns, and re-add 'grid-auto-flow:none'.
1 parent 6ad605f commit 4646eb1

File tree

2 files changed

+33
-26
lines changed

2 files changed

+33
-26
lines changed

css-grid/Overview.html

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,11 +1191,13 @@ <h4 data-level=5.1.5 id=resolved-track-list><span class=secno>5.1.5 </span><span
11911191
// (a) 50px (b) 320px (b c d) repeat(2, (e) 40px) repeat(4, 0px) 50px
11921192
&lt;/script&gt;</pre> </div>
11931193

1194-
<p class=issue>
1195-
In general, resolved values are the computed values,
1196-
except for a small list of legacy 2.1 properties.
1197-
Do we really want these properties to return the used value here?
1198-
<a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=16906">Bug about this.</a>
1194+
<p class=note> Note: In general, resolved values are the computed values,
1195+
except for a small list of legacy 2.1 properties.
1196+
However, compatibility with early implementations of this module
1197+
requires us to define <a class=property data-link-type=propdesc href=#propdef-grid-template-rows title=grid-template-rows>grid-template-rows</a> and <a class=property data-link-type=propdesc href=#propdef-grid-template-columns title=grid-template-columns>grid-template-columns</a> as returning used values.
1198+
Authors are recommended to use the
1199+
<a href=http://dev.w3.org/csswg/cssom/#the-getstyleutils-interface><code>.rawComputedStyle</code> and <code>.usedStyle</code> attributes</a>
1200+
instead of <code>getComputedStyle()</code>.
11991201

12001202

12011203
<h3 data-level=5.2 id=grid-template-areas-property><span class=secno>5.2 </span><span class=content>
@@ -1298,7 +1300,7 @@ <h3 data-level=5.3 id=explicit-grid-shorthand><span class=secno>5.3 </span><span
12981300
It has three distinct syntax forms:
12991301

13001302
<dl data-dfn-for=grid-template data-dfn-type=value>
1301-
<dt><dfn data-dfn-for=grid-template data-dfn-type=value data-export="" id=valuedef-none>none</dfn>
1303+
<dt><dfn data-dfn-for=grid-template data-dfn-type=value data-export="" id=valuedef-none2>none</dfn>
13021304
<dd>
13031305
Sets all three properties to their initial values (<a data-link-for=grid-template-rows data-link-type=value href=#valuedef-none0>none</a>).
13041306

@@ -1418,13 +1420,18 @@ <h3 data-level=6.1 id=auto-tracks><span class=secno>6.1 </span><span class=conte
14181420
<h3 data-level=6.2 id=grid-auto-flow-property><span class=secno>6.2 </span><span class=content>
14191421
Automatic Placement: the <a class=property data-link-type=propdesc href=#propdef-grid-auto-flow title=grid-auto-flow>grid-auto-flow</a> property</span><a class=section-link href=#grid-auto-flow-property>§</a></h3>
14201422

1421-
<table class=propdef><tr><th>Name:<td><dfn data-dfn-type=property data-export="" id=propdef-grid-auto-flow>grid-auto-flow</dfn><tr><th>Value:<td>[ rows | columns ] &amp;&amp; dense?<tr><th>Initial:<td>rows<tr><th>Applies to:<td><a href=#grid-container>grid containers</a><tr><th>Inherited:<td>no<tr><th>Percentages:<td>n/a<tr><th>Media:<td>visual<tr><th>Computed value:<td>specified value</table>
1423+
<table class=propdef><tr><th>Name:<td><dfn data-dfn-type=property data-export="" id=propdef-grid-auto-flow>grid-auto-flow</dfn><tr><th>Value:<td>none | [ [ rows | columns ] &amp;&amp; dense? ]<tr><th>Initial:<td>rows<tr><th>Applies to:<td><a href=#grid-container>grid containers</a><tr><th>Inherited:<td>no<tr><th>Percentages:<td>n/a<tr><th>Media:<td>visual<tr><th>Computed value:<td>specified value</table>
14221424
<p>
14231425
<a href=#grid-item>Grid items</a> that aren't explicitly placed are are automatically placed into an unoccupied space in the <a href=#grid-container>grid container</a>.
14241426
The <a class=property data-link-type=propdesc href=#propdef-grid-auto-flow title=grid-auto-flow>grid-auto-flow</a> property controls the direction in which the search for unoccupied space takes place,
14251427
and whether rows or columns are added as needed to accommodate the content.
14261428

14271429
<dl data-dfn-for=grid-auto-flow data-dfn-type=value>
1430+
<dt><dfn data-dfn-for=grid-auto-flow data-dfn-type=value data-export="" id=valuedef-none>none</dfn>
1431+
<dd>
1432+
Rather than use the auto-placement algorithm,
1433+
auto-placed <a href=#grid-item>grid items</a> are simply positioned according to the <a class=property data-link-type=propdesc title=grid-auto-position>grid-auto-position</a> property.
1434+
14281435
<dt><dfn data-dfn-for=grid-auto-flow data-dfn-type=value data-export="" id=valuedef-rows>rows</dfn>
14291436
<dd>
14301437
The auto-placement algorithm places items
@@ -1447,11 +1454,7 @@ <h3 data-level=6.2 id=grid-auto-flow-property><span class=secno>6.2 </span><span
14471454
<p class=note> Note: This may cause items to appear out-of-order.
14481455
</dl>
14491456

1450-
<p class=issue>
1451-
Add a value for stacking items on top of each other?
1452-
1453-
<p class=issue>
1454-
Add a value for flowing items together into a single slot?
1457+
<p class=note> Note: A future level of this module is expected to add a value that flows auto-positioned items together into a single “default” cell.
14551458

14561459
<p>
14571460
Auto-placement takes <a href=#grid-item>grid items</a> in <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-flexbox-1/#order title=order>order</a>-modified document order.
@@ -2768,7 +2771,8 @@ <h2 class="no-num no-ref" id=index><span class=content>
27682771
<li>named line, <a href=#named-lines0 title="section 5.1.1">5.1.1</a>
27692772
<li>none (value), <a href=#valuedef-none0 title="section 5.1">5.1</a>
27702773
<li>none (value), <a href=#valuedef-none1 title="section 5.2">5.2</a>
2771-
<li>none (value), <a href=#valuedef-none title="section 5.3">5.3</a>
2774+
<li>none (value), <a href=#valuedef-none2 title="section 5.3">5.3</a>
2775+
<li>none (value), <a href=#valuedef-none title="section 6.2">6.2</a>
27722776
<li>order-modified grid order, <a href=#order-modified-grid-order title="section 9.5">9.5</a>
27732777
<li>participates in baseline alignment, <a href=#baseline-participation title="section 9.5">9.5</a>
27742778
<li>&lt;percentage&gt; (value), <a href=#valuedef-percentage title="section 5.1">5.1</a>
@@ -2802,7 +2806,7 @@ <h2 class="no-num no-ref" id=property-index><span class=content>
28022806
<tr><th scope=row><a data-property="">grid-template</a><td>none | <a class=production data-link-type=propdesc href=#propdef-grid-template-columns title=grid-template-columns>&lt;‘grid-template-columns’&gt;</a> / <a class=production data-link-type=propdesc href=#propdef-grid-template-rows title=grid-template-rows>&lt;‘grid-template-rows’&gt;</a> |<br> [ <a class=production data-link-type=type href=#typedef-track-list>&lt;track-list&gt;</a> / ]? [ <a class=production data-link-type=type href=#typedef-line-names>&lt;line-names&gt;</a>? <a class=production data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#string-value>&lt;string&gt;</a> [ <a class=production data-link-type=type href=#typedef-track-size>&lt;track-size&gt;</a> <a class=production data-link-type=type href=#typedef-line-names>&lt;line-names&gt;</a> ]? ]+<td>see individual properties<td><td>see individual properties<td>see individual properties<td>visual<td><a href=#grid-container>grid containers</a><td>see individual properties<td>
28032807
<tr><th scope=row><a data-property="">grid-auto-columns</a><td><a class=production data-link-type=type href=#typedef-track-size>&lt;track-size&gt;</a><td>auto<td><td>no<td>see <a href=#track-sizing>Track Sizing</a><td>visual<td><a href=#grid-container>grid containers</a><td>see <a href=#track-sizing>Track Sizing</a><td>
28042808
<tr><th scope=row><a data-property="">grid-auto-rows</a><td><a class=production data-link-type=type href=#typedef-track-size>&lt;track-size&gt;</a><td>auto<td><td>no<td>see <a href=#track-sizing>Track Sizing</a><td>visual<td><a href=#grid-container>grid containers</a><td>see <a href=#track-sizing>Track Sizing</a><td>
2805-
<tr><th scope=row><a data-property="">grid-auto-flow</a><td>[ rows | columns ] &amp;&amp; dense?<td>rows<td><td>no<td>n/a<td>visual<td><a href=#grid-container>grid containers</a><td>specified value<td>
2809+
<tr><th scope=row><a data-property="">grid-auto-flow</a><td>none | [ [ rows | columns ] &amp;&amp; dense? ]<td>rows<td><td>no<td>n/a<td>visual<td><a href=#grid-container>grid containers</a><td>specified value<td>
28062810
<tr><th scope=row><a data-property="">grid-auto</a><td><a class=production data-link-type=propdesc href=#propdef-grid-auto-flow title=grid-auto-flow>&lt;‘grid-auto-flow’&gt;</a> || [ <a class=production data-link-type=propdesc href=#propdef-grid-auto-columns title=grid-auto-columns>&lt;‘grid-auto-columns’&gt;</a> [ / <a class=production data-link-type=propdesc href=#propdef-grid-auto-rows title=grid-auto-rows>&lt;‘grid-auto-rows’&gt;</a> ]? ]<td>see individual properties<td><td>see individual properties<td>see individual properties<td>visual<td><a href=#grid-container>grid containers</a><td>see individual properties<td>
28072811
<tr><th scope=row><a data-property="">grid-row-start</a><td><a class=production data-link-type=type href=#typedef-grid-line>&lt;grid-line&gt;</a><td>auto<td><td>no<td>n/a<td>visual<td><a href=#grid-item>grid items</a><td>specified value (almost)<td>
28082812
<tr><th scope=row><a data-property="">grid-column-start</a><td><a class=production data-link-type=type href=#typedef-grid-line>&lt;grid-line&gt;</a><td>auto<td><td>no<td>n/a<td>visual<td><a href=#grid-item>grid items</a><td>specified value (almost)<td>

css-grid/Overview.src.html

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ <h1>CSS Grid Layout Module Level 1</h1>
1515
Previous editors: <a href="mailto:pcupp@microsoft.com">Phil Cupp</a>, Microsoft Corporation
1616
Issues list: <a href="https://www.w3.org/Bugs/Public/buglist.cgi?product=CSS&amp;component=Grid+Layout&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED">In Bugzilla</a>
1717
Abstract: This CSS module defines a two-dimensional grid-based layout system, optimized for user interface design. In the grid layout model, the children of a grid container can be positioned into arbitrary slots in a flexible or fixed predefined layout grid.
18-
Ignored Terms: column-*, justify-*, containing block, grid-field, <positive-integer>, <ident>, auto
18+
Ignored Terms: column-*, justify-*, containing block, grid-field, <positive-integer>, <ident>, auto, grid-auto-position
1919
Link Defaults: css21 (property) margin, css-align-3 (dfn) alignment container/alignment subject
2020
</pre>
2121

@@ -1130,11 +1130,13 @@ <h4 id='resolved-track-list'>
11301130
&lt;/script></pre>
11311131
</div>
11321132

1133-
<p class='issue'>
1134-
In general, resolved values are the computed values,
1135-
except for a small list of legacy 2.1 properties.
1136-
Do we really want these properties to return the used value here?
1137-
<a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=16906">Bug about this.</a>
1133+
Note: In general, resolved values are the computed values,
1134+
except for a small list of legacy 2.1 properties.
1135+
However, compatibility with early implementations of this module
1136+
requires us to define 'grid-template-rows' and 'grid-template-columns' as returning used values.
1137+
Authors are recommended to use the
1138+
<a href="http://dev.w3.org/csswg/cssom/#the-getstyleutils-interface"><code>.rawComputedStyle</code> and <code>.usedStyle</code> attributes</a>
1139+
instead of <code>getComputedStyle()</code>.
11381140

11391141

11401142
<h3 id="grid-template-areas-property">
@@ -1400,7 +1402,7 @@ <h3 id="grid-auto-flow-property">
14001402

14011403
<pre class='propdef'>
14021404
Name: grid-auto-flow
1403-
Value: [ rows | columns ] && dense?
1405+
Value: none | [ [ rows | columns ] && dense? ]
14041406
Initial: rows
14051407
Applies to: <a>grid containers</a>
14061408
Inherited: no
@@ -1415,6 +1417,11 @@ <h3 id="grid-auto-flow-property">
14151417
and whether rows or columns are added as needed to accommodate the content.
14161418

14171419
<dl dfn-for=grid-auto-flow dfn-type=value>
1420+
<dt><dfn>none</dfn>
1421+
<dd>
1422+
Rather than use the auto-placement algorithm,
1423+
auto-placed <a>grid items</a> are simply positioned according to the 'grid-auto-position' property.
1424+
14181425
<dt><dfn>rows</dfn>
14191426
<dd>
14201427
The auto-placement algorithm places items
@@ -1437,11 +1444,7 @@ <h3 id="grid-auto-flow-property">
14371444
Note: This may cause items to appear out-of-order.
14381445
</dl>
14391446

1440-
<p class='issue'>
1441-
Add a value for stacking items on top of each other?
1442-
1443-
<p class='issue'>
1444-
Add a value for flowing items together into a single slot?
1447+
Note: A future level of this module is expected to add a value that flows auto-positioned items together into a single “default” cell.
14451448

14461449
<p>
14471450
Auto-placement takes <a>grid items</a> in 'order'-modified document order.

0 commit comments

Comments
 (0)