|
89 | 89 | </p> |
90 | 90 | <h1 class="p-name no-ref" id=title>CSS Grid Layout Module Level 1</h1> |
91 | 91 | <h2 class="no-num no-toc no-ref heading settled heading" id=subtitle><span class=content>Editor’s Draft, |
92 | | - <span class=dt-updated><span class=value-title title=20140417>17 April 2014</span></span></span></h2> |
| 92 | + <span class=dt-updated><span class=value-title title=20140418>18 April 2014</span></span></span></h2> |
93 | 93 | <div data-fill-with=spec-metadata><dl><dt>This version:<dd><a class=u-url href=http://dev.w3.org/csswg/css-grid/>http://dev.w3.org/csswg/css-grid/</a><dt>Latest version:<dd><a href=http://www.w3.org/TR/css-grid-1/>http://www.w3.org/TR/css-grid-1/</a><dt>Editor’s Draft:<dd><a href=http://dev.w3.org/csswg/css-grid/>http://dev.w3.org/csswg/css-grid/</a><dt>Previous Versions:<dd><a href=http://www.w3.org/TR/2013/WD-css3-grid-layout-20130402/ rel=previous>http://www.w3.org/TR/2013/WD-css3-grid-layout-20130402/</a><dd><a href=http://www.w3.org/TR/2012/WD-css3-grid-layout-20121106/ rel=previous>http://www.w3.org/TR/2012/WD-css3-grid-layout-20121106/</a> |
94 | 94 | <dt>Feedback:</dt> |
95 | 95 | <dd><a href="mailto:www-style@w3.org?subject=%5Bcss-grid%5D%20feedback">www-style@w3.org</a> |
@@ -699,9 +699,16 @@ <h3 class="heading settled heading" data-level=3.1 id=grid-containers><span clas |
699 | 699 | <a href=http://www.w3.org/TR/CSS21/visudet.html#containing-block-details>exactly like block containers do</a>. <a data-biblio-type=normative data-link-type=biblio href=#css21 title=css21>[CSS21]</a> |
700 | 700 | The <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-overflow-3/#overflow0 title=overflow>overflow</a> property applies to <a data-link-type=dfn href=#grid-container title="grid containers">grid containers</a>. |
701 | 701 |
|
| 702 | +<p> A <a data-link-type=dfn href=#grid-container title="grid container">grid container</a> is sized |
| 703 | + using the rules of the formatting context in which it participates. |
| 704 | + In a <a data-link-type=dfn title="block formatting context">block formatting context</a>, |
| 705 | + a <a data-link-type=dfn href=#grid-container title="grid container’s">grid container’s</a> <a class=css data-link-type=maybe href=#valuedef-auto title=auto>auto</a> block size |
| 706 | + is its max-content block size. |
| 707 | + <span class=issue id=issue-8669c070><a class=self-link href=#issue-8669c070></a>The block layout spec should define this.</span> |
702 | 708 |
|
703 | 709 | <p> Grid containers are not block containers, |
704 | | - and so some properties that were designed with the assumption of block layout don’t apply in the context of grid layout. |
| 710 | + and so some properties that were designed with the assumption of block layout |
| 711 | + don’t apply in the context of grid layout. |
705 | 712 | In particular: |
706 | 713 |
|
707 | 714 | <p> <ul> |
@@ -877,7 +884,9 @@ <h3 class="heading settled heading" data-level=5.1 id=track-sizing><span class=s |
877 | 884 | <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#percentage-value title="<percentage>"><percentage></a> values are relative to the measure (logical width) of the <a data-link-type=dfn href=#grid-container title="grid container">grid container</a> in column <a data-link-type=dfn href=#grid-track title="grid tracks">grid tracks</a>, |
878 | 885 | and the extent (logical height) of the <a data-link-type=dfn href=#grid-container title="grid container">grid container</a> in row <a data-link-type=dfn href=#grid-track title="grid tracks">grid tracks</a>. |
879 | 886 | If the measure or extent of the <a data-link-type=dfn href=#grid-container title="grid container">grid container</a> is an <a href=http://www.w3.org/TR/css3-sizing/#indefinite-size>indefinite size</a>, |
880 | | - <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#percentage-value title="<percentage>"><percentage></a> values relative to that size are treated as <a class=css-code data-link-for=width data-link-type=value title=auto>auto</a>. |
| 887 | + <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#percentage-value title="<percentage>"><percentage></a> values relative to that size are treated as <a class=css-code data-link-for=width data-link-type=value title=auto>auto</a> |
| 888 | + (or, if in a <a class=css data-link-type=maybe href=#valuedef-minmax title=minmax()>minmax()</a> function, as <a class=css data-link-type=maybe href=#valuedef-min-content title=min-content>min-content</a> when in the first position |
| 889 | + and as <a class=css data-link-type=maybe href=#valuedef-max-content title=max-content>max-content</a> when in the second). |
881 | 890 |
|
882 | 891 | <dt><dfn class=css-code data-dfn-for="grid-template-columns grid-template-rows" data-dfn-type=value data-export="" id=valuedef-flex><a class="production css-code" data-link-type=type href=#typedef-flex title="<flex>"><flex></a><a class=self-link href=#valuedef-flex></a></dfn> |
883 | 892 | <dd> |
@@ -999,7 +1008,9 @@ <h4 class="heading settled heading" data-level=5.1.2 id=repeat-notation><span cl |
999 | 1008 | Repeating Rows and Columns: the <a class=css data-link-type=maybe href=#funcdef-repeat title=repeat()>repeat()</a> notation</span><a class=self-link href=#repeat-notation></a></h4> |
1000 | 1009 |
|
1001 | 1010 | <p> The <a class=css data-link-type=maybe href=#funcdef-repeat title=repeat()>repeat()</a> notation represents a repeated fragment of the <a data-link-type=dfn href=#track-list title="track list">track list</a>. |
1002 | | - This is just a syntactic shorthand that allows writing a large number of columns or rows that exhibit a recurring pattern in a more compact form. |
| 1011 | + This is just a syntactic shorthand that allows |
| 1012 | + writing a large number of columns or rows that exhibit a recurring pattern |
| 1013 | + in a more compact form. |
1003 | 1014 | The syntax of the <a class=css data-link-type=maybe href=#funcdef-repeat title=repeat()>repeat()</a> notation is: |
1004 | 1015 |
|
1005 | 1016 | <pre class=prod><dfn class=css-code data-dfn-type=function data-export="" id=funcdef-repeat>repeat()<a class=self-link href=#funcdef-repeat></a></dfn> = repeat( <a class="production css-code" data-link-type=type title="<positive-integer>"><positive-integer></a> , [ <a class="production css-code" data-link-type=type href=#typedef-line-names title="<line-names>"><line-names></a>? <a class="production css-code" data-link-type=type href=#typedef-track-size title="<track-size>"><track-size></a> ]+ <a class="production css-code" data-link-type=type href=#typedef-line-names title="<line-names>"><line-names></a>? )</pre> |
@@ -1033,12 +1044,9 @@ <h4 class="heading settled heading" data-level=5.1.2 id=repeat-notation><span cl |
1033 | 1044 | </style> |
1034 | 1045 | </pre> </div> |
1035 | 1046 |
|
1036 | | -<p> The <a class=css data-link-type=maybe href=#funcdef-repeat title=repeat()>repeat()</a> function does not literally repeat its arguments, textually, into the value. |
1037 | | - (If it did so, it would sometimes produce invalid values, |
1038 | | - such as <span class=css data-link-type=maybe title="repeat(2, (a) 1fr (b))">repeat(2, (a) 1fr (b))</span> expanding into <span class=css data-link-type=maybe title="(a) 1fr (b) (a) 1fr (b)">(a) 1fr (b) (a) 1fr (b)</span>.) |
1039 | | - The <a class="production css-code" data-link-type=type href=#typedef-line-names title="<line-names>"><line-names></a> in its argument specify the position of some named lines relative to the tracks it defines; |
1040 | | - these must be joined with any other named lines defined for that position. |
1041 | | - (So the previous example is actually equivalent to the expanded value <span class=css data-link-type=maybe title="(a) 1fr (b a) 1fr (b)">(a) 1fr (b a) 1fr (b)</span>.) |
| 1047 | +<p> If the <a class=css data-link-type=maybe href=#funcdef-repeat title=repeat()>repeat()</a> function ends up placing two <a class="production css-code" data-link-type=type href=#typedef-line-names title="<line-names>"><line-names></a> adjacent to each other, |
| 1048 | + the name lists are merged. |
| 1049 | + For example, <span class=css data-link-type=maybe title="repeat(2, (a) 1fr (b))">repeat(2, (a) 1fr (b))</span> is equivalent to <span class=css data-link-type=maybe title="(a) 1fr (b a) 1fr (b)">(a) 1fr (b a) 1fr (b)</span>. |
1042 | 1050 |
|
1043 | 1051 | <p class=note> Note: It is expected that a future level of this specification will define a value to be inserted between the repetitions, |
1044 | 1052 | similar to the argument of the <code>Array#join</code> method in JavaScript. |
@@ -2663,6 +2671,7 @@ <h3 class="heading settled heading" data-level=10.4 id=algo-content><span class= |
2663 | 2671 | Mark any tracks whose <a data-link-type=dfn href=#growth-limit title="growth limit">growth limit</a> changed |
2664 | 2672 | from infinite to finite in this step |
2665 | 2673 | as infinitely growable for the next step. |
| 2674 | + |
2666 | 2675 | <li> |
2667 | 2676 | <strong>For max-content maximums:</strong> |
2668 | 2677 | Lastly continue to increase the <a data-link-type=dfn href=#growth-limit title="growth limit">growth limit</a> of tracks with |
@@ -2833,10 +2842,6 @@ <h3 class="heading settled heading" data-level=10.7 id=intrinsic-sizes><span cla |
2833 | 2842 |
|
2834 | 2843 | <p> See <a data-biblio-type=normative data-link-type=biblio href=#css3-sizing title=css3-sizing>[CSS3-SIZING]</a> for a definition of the terms in this section. |
2835 | 2844 |
|
2836 | | -<p> In a <a data-link-type=dfn title="block formatting context">block formatting context</a>, |
2837 | | - a <a data-link-type=dfn href=#grid-container title="grid container’s">grid container’s</a> <a class=css data-link-type=maybe href=#valuedef-auto title=auto>auto</a> block size |
2838 | | - is its max-content block size. |
2839 | | - |
2840 | 2845 |
|
2841 | 2846 | <h2 class="heading settled heading" data-level=11 id=pagination><span class=secno>11 </span><span class=content> |
2842 | 2847 | Fragmenting Grid Layout</span><a class=self-link href=#pagination></a></h2> |
@@ -3335,7 +3340,9 @@ <h2 class="no-num no-ref heading settled heading" id=property-index><span class= |
3335 | 3340 | <tr><th scope=row><a class=css-code data-link-type=property href=#propdef-grid-area title=grid-area>grid-area</a><td><grid-line> [ / <grid-line> ]{0,3}<td>see individual properties<td>grid items<td>see individual properties<td>see individual properties<td>visual<td>see individual properties</table></div> |
3336 | 3341 |
|
3337 | 3342 |
|
3338 | | -<h2 class="no-num heading settled" id=issues-index><span class=content>Issues Index</span><a class=self-link href=#issues-index></a></h2><div style="counter-reset: issue"><div class=issue> |
| 3343 | +<h2 class="no-num heading settled" id=issues-index><span class=content>Issues Index</span><a class=self-link href=#issues-index></a></h2><div style="counter-reset: issue"><div class=issue>The block layout spec should define this.<a href=#issue-8669c070> ↵ </a></div> |
| 3344 | + |
| 3345 | +<div class=issue> |
3339 | 3346 | We want the ability to collapse grid tracks |
3340 | 3347 | (similar to <a href=http://www.w3.org/TR/css3-flexbox/#visibility-collapse>collapsing flex items</a> |
3341 | 3348 | or <a href=http://www.w3.org/TR/CSS21/tables.html#dynamic-effects>table rows/columns</a>), |
|
0 commit comments