Skip to content

Commit d594e08

Browse files
committed
[css-grid] Minor tweaks to wording/spacing.
1 parent 369731f commit d594e08

2 files changed

Lines changed: 40 additions & 28 deletions

File tree

css-grid/Overview.bs

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -540,9 +540,16 @@ Grid Containers: the <a value>grid</a> and ''inline-grid'' 'display' values</h3>
540540
<a href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details">exactly like block containers do</a>. [[!CSS21]]
541541
The 'overflow' property applies to <a>grid containers</a>.
542542

543+
A <i>grid container</i> is sized
544+
using the rules of the formatting context in which it participates.
545+
In a <a>block formatting context</a>,
546+
a <a>grid container’s</a> ''auto'' block size
547+
is its max-content block size.
548+
<span class="issue">The block layout spec should define this.</span>
543549

544550
Grid containers are not block containers,
545-
and so some properties that were designed with the assumption of block layout don't apply in the context of grid layout.
551+
and so some properties that were designed with the assumption of block layout
552+
don't apply in the context of grid layout.
546553
In particular:
547554

548555
<ul>
@@ -751,7 +758,9 @@ Track Sizing: the 'grid-template-rows' and 'grid-template-columns' properties</h
751758
<<percentage>> values are relative to the measure (logical width) of the <a>grid container</a> in column <a>grid tracks</a>,
752759
and the extent (logical height) of the <a>grid container</a> in row <a>grid tracks</a>.
753760
If the measure or extent of the <a>grid container</a> is an <a href="http://www.w3.org/TR/css3-sizing/#indefinite-size">indefinite size</a>,
754-
<<percentage>> values relative to that size are treated as <a value for=width>auto</a>.
761+
<<percentage>> values relative to that size are treated as <a value for=width>auto</a>
762+
(or, if in a ''minmax()'' function, as ''min-content'' when in the first position
763+
and as ''max-content'' when in the second).
755764

756765
<dt><dfn><<flex>></dfn>
757766
<dd>
@@ -878,7 +887,9 @@ Named Grid Lines: the ''(<<custom-ident>>*)'' syntax</h4>
878887
Repeating Rows and Columns: the ''repeat()'' notation</h4>
879888

880889
The ''repeat()'' notation represents a repeated fragment of the <a>track list</a>.
881-
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.
890+
This is just a syntactic shorthand that allows
891+
writing a large number of columns or rows that exhibit a recurring pattern
892+
in a more compact form.
882893
The syntax of the ''repeat()'' notation is:
883894

884895
<pre class='prod'><dfn>repeat()</dfn> = repeat( <<positive-integer>> , [ <<line-names>>? <<track-size>> ]+ <<line-names>>? )</pre>
@@ -915,12 +926,9 @@ Repeating Rows and Columns: the ''repeat()'' notation</h4>
915926
</pre>
916927
</div>
917928

918-
The ''repeat()'' function does not literally repeat its arguments, textually, into the value.
919-
(If it did so, it would sometimes produce invalid values,
920-
such as ''repeat(2, (a) 1fr (b))'' expanding into ''(a) 1fr (b) (a) 1fr (b)''.)
921-
The <<line-names>> in its argument specify the position of some named lines relative to the tracks it defines;
922-
these must be joined with any other named lines defined for that position.
923-
(So the previous example is actually equivalent to the expanded value ''(a) 1fr (b a) 1fr (b)''.)
929+
If the ''repeat()'' function ends up placing two <<line-names>> adjacent to each other,
930+
the name lists are merged.
931+
For example, ''repeat(2, (a) 1fr (b))'' is equivalent to ''(a) 1fr (b a) 1fr (b)''.
924932

925933
Note: It is expected that a future level of this specification will define a value to be inserted between the repetitions,
926934
similar to the argument of the <code>Array#join</code> method in JavaScript.
@@ -2687,6 +2695,7 @@ Resolve Content-Based Track Sizing Functions</h3>
26872695
Mark any tracks whose <i>growth limit</i> changed
26882696
from infinite to finite in this step
26892697
as infinitely growable for the next step.
2698+
<!-- http://lists.w3.org/Archives/Public/www-style/2014Mar/0500.html -->
26902699
<li>
26912700
<strong>For max-content maximums:</strong>
26922701
Lastly continue to increase the <i>growth limit</i> of tracks with
@@ -2858,10 +2867,6 @@ Intrinsic Sizes</h3>
28582867

28592868
See [[!CSS3-SIZING]] for a definition of the terms in this section.
28602869

2861-
In a <a>block formatting context</a>,
2862-
a <a>grid container’s</a> ''auto'' block size
2863-
is its max-content block size.
2864-
28652870

28662871
<h2 id='pagination'>
28672872
Fragmenting Grid Layout</h2>

css-grid/Overview.html

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
</p>
9090
<h1 class="p-name no-ref" id=title>CSS Grid Layout Module Level 1</h1>
9191
<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>
9393
<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>
9494
<dt>Feedback:</dt>
9595
<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
699699
<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>
700700
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>.
701701

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>
702708

703709
<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.
705712
In particular:
706713

707714
<p> <ul>
@@ -877,7 +884,9 @@ <h3 class="heading settled heading" data-level=5.1 id=track-sizing><span class=s
877884
<a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#percentage-value title="<percentage>">&lt;percentage&gt;</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>,
878885
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>.
879886
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>">&lt;percentage&gt;</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>">&lt;percentage&gt;</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).
881890

882891
<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>">&lt;flex&gt;</a><a class=self-link href=#valuedef-flex></a></dfn>
883892
<dd>
@@ -999,7 +1008,9 @@ <h4 class="heading settled heading" data-level=5.1.2 id=repeat-notation><span cl
9991008
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>
10001009

10011010
<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.
10031014
The syntax of the <a class=css data-link-type=maybe href=#funcdef-repeat title=repeat()>repeat()</a> notation is:
10041015

10051016
<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>">&lt;positive-integer&gt;</a> , [ <a class="production css-code" data-link-type=type href=#typedef-line-names title="<line-names>">&lt;line-names&gt;</a>? <a class="production css-code" data-link-type=type href=#typedef-track-size title="<track-size>">&lt;track-size&gt;</a> ]+ <a class="production css-code" data-link-type=type href=#typedef-line-names title="<line-names>">&lt;line-names&gt;</a>? )</pre>
@@ -1033,12 +1044,9 @@ <h4 class="heading settled heading" data-level=5.1.2 id=repeat-notation><span cl
10331044
&lt;/style&gt;
10341045
</pre> </div>
10351046

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>">&lt;line-names&gt;</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>">&lt;line-names&gt;</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>.
10421050

10431051
<p class=note> Note: It is expected that a future level of this specification will define a value to be inserted between the repetitions,
10441052
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=
26632671
Mark any tracks whose <a data-link-type=dfn href=#growth-limit title="growth limit">growth limit</a> changed
26642672
from infinite to finite in this step
26652673
as infinitely growable for the next step.
2674+
26662675
<li>
26672676
<strong>For max-content maximums:</strong>
26682677
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
28332842

28342843
<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.
28352844

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-
28402845

28412846
<h2 class="heading settled heading" data-level=11 id=pagination><span class=secno>11 </span><span class=content>
28422847
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=
33353340
<tr><th scope=row><a class=css-code data-link-type=property href=#propdef-grid-area title=grid-area>grid-area</a><td>&lt;grid-line&gt; [ / &lt;grid-line&gt; ]{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>
33363341

33373342

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>
33393346
We want the ability to collapse grid tracks
33403347
(similar to <a href=http://www.w3.org/TR/css3-flexbox/#visibility-collapse>collapsing flex items</a>
33413348
or <a href=http://www.w3.org/TR/CSS21/tables.html#dynamic-effects>table rows/columns</a>),

0 commit comments

Comments
 (0)