Skip to content

Commit 95c3448

Browse files
committed
[css3-grid-layout] Define 'explicit grid', fill in the 'Defining the Grid' intro, add issue for naming.
1 parent de64be7 commit 95c3448

2 files changed

Lines changed: 84 additions & 6 deletions

File tree

css3-grid-layout/Overview.html

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,7 +1211,56 @@ <h3 id=visibility-collapse><span class=secno>4.3. </span> Collapsed Grid
12111211

12121212
<h2 id=grid-definition><span class=secno>5. </span> Defining the Grid</h2>
12131213

1214-
<p class=issue> Fill in text.
1214+
<p> The three properties ‘<a href="#grid-definition-rows"><code
1215+
class=property>grid-definition-rows</code></a>’, ‘<a
1216+
href="#grid-definition-columns"><code
1217+
class=property>grid-definition-columns</code></a>’, and ‘<a
1218+
href="#grid-template"><code class=property>grid-template</code></a>
1219+
together define the <dfn id=explicit-grid>explicit grid</dfn> of a <a
1220+
href="#grid-container"><i>grid container</i></a>. The final grid may end
1221+
up larger due to <a href="#grid-item"><i>grid items</i></a> placed outside
1222+
the <a href="#explicit-grid"><i>explicit grid</i></a>; in this case, any
1223+
implicit tracks are sized by the ‘<a href="#grid-auto-rows"><code
1224+
class=property>grid-auto-rows</code></a>’ and ‘<a
1225+
href="#grid-auto-columns"><code
1226+
class=property>grid-auto-columns</code></a>’ properties.
1227+
1228+
<p> The size of the <a href="#explicit-grid"><i>explicit grid</i></a> is
1229+
determined by the larger of the number of rows/columns defined by ‘<a
1230+
href="#grid-template"><code class=property>grid-template</code></a>’ and
1231+
the number of rows/columns sized by ‘<a
1232+
href="#grid-definition-rows"><code
1233+
class=property>grid-definition-rows</code></a>’/‘<a
1234+
href="#grid-definition-columns"><code
1235+
class=property>grid-definition-columns</code></a>’. Any rows/columns
1236+
defined by ‘<a href="#grid-template"><code
1237+
class=property>grid-template</code></a>’ but not sized by ‘<a
1238+
href="#grid-definition-rows"><code
1239+
class=property>grid-definition-rows</code></a>’/‘<a
1240+
href="#grid-definition-columns"><code
1241+
class=property>grid-definition-columns</code></a>’ take their size from
1242+
the ‘<a href="#grid-auto-rows"><code
1243+
class=property>grid-auto-rows</code></a>’/‘<a
1244+
href="#grid-auto-columns"><code
1245+
class=property>grid-auto-columns</code></a>’ properties.
1246+
1247+
<p> Numeric indexes in the <a
1248+
href="#grid-placement-properties"><i>grid-placement properties</i></a>
1249+
count from the edges of the <a href="#explicit-grid"><i>explicit
1250+
grid</i></a>. Positive indexes count from the before/start side, while
1251+
negative indexes count from the after/end side.
1252+
1253+
<p class=issue> Since all three properties define the explicit grid, would
1254+
it make sense to give them all a common prefix (and possibly a shorthand
1255+
unifying them, as in <a
1256+
href="http://dev.w3.org/csswg/css3-layout/#grid-shorthand">Bert's ‘<code
1257+
class=property>grid</code>’ shorthand</a>)? Current thoughts: ‘<a
1258+
href="#grid-template"><code class=property>grid-template</code></a>’ as
1259+
the shorthand, with ‘<code
1260+
class=css>grid-template-rows/columns/slots</code>’ as the longhands, or
1261+
<code class=property>grid-definition</code>’ as the shorthand, with
1262+
<code class=css>grid-definition-rows/columns/template</code>’ as the
1263+
longhands. Other suggestions welcome.
12151264

12161265
<h3 id=track-sizing><span class=secno>5.1. </span> Track Sizing: the ‘<a
12171266
href="#grid-definition-rows"><code
@@ -1906,10 +1955,11 @@ <h3 id=line-placement><span class=secno>6.1. </span> Line-based Placement:
19061955
<dd> Specifies that the corresponding edge of the item's <a
19071956
href="#grid-area"><i>grid area</i></a> is the <var>N</var>th <a
19081957
href="#grid-line"><i>grid line</i></a> from the before/start edge of the
1909-
<i>explicit grid</i>. If a negative integer is given, it instead counts
1910-
in reverse, starting from the after/end edge of the <i>explicit grid</i>.
1911-
If a name is given as a <var>&lt;string></var>, only lines with that name
1912-
are considered. If the <var>&lt;integer></var> is omitted, it defaults to
1958+
<a href="#explicit-grid"><i>explicit grid</i></a>. If a negative integer
1959+
is given, it instead counts in reverse, starting from the after/end edge
1960+
of the <a href="#explicit-grid"><i>explicit grid</i></a>. If a name is
1961+
given as a <var>&lt;string></var>, only lines with that name are
1962+
considered. If the <var>&lt;integer></var> is omitted, it defaults to
19131963
<code class=css>1</code>’. A value of zero makes the declaration
19141964
invalid.
19151965

@@ -3730,6 +3780,9 @@ <h2 class=no-num id=index> Index</h2>
37303780
<li>DistributeSpaceToTracks, <a href="#function-DistributeSpaceToTracks"
37313781
title="section 8.2."><strong>8.2.</strong></a>
37323782

3783+
<li>explicit grid, <a href="#explicit-grid"
3784+
title="section 5."><strong>5.</strong></a>
3785+
37333786
<li><var>&lt;flex></var>, <a href="#ltflex"
37343787
title="section 5.1."><strong>5.1.</strong></a>
37353788

css3-grid-layout/Overview.src.html

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,8 +876,33 @@ <h3 id="visibility-collapse">
876876
<h2 id='grid-definition'>
877877
Defining the Grid</h2>
878878

879+
<p>
880+
The three properties 'grid-definition-rows', 'grid-definition-columns', and 'grid-template'
881+
together define the <dfn>explicit grid</dfn> of a <i>grid container</i>.
882+
The final grid may end up larger due to <i>grid items</i> placed outside the <i>explicit grid</i>;
883+
in this case, any implicit tracks are sized by the 'grid-auto-rows' and 'grid-auto-columns' properties.
884+
885+
<p>
886+
The size of the <i>explicit grid</i> is determined by the larger of
887+
the number of rows/columns defined by 'grid-template'
888+
and the number of rows/columns sized by 'grid-definition-rows'/'grid-definition-columns'.
889+
Any rows/columns defined by 'grid-template' but not sized by 'grid-definition-rows'/'grid-definition-columns'
890+
take their size from the 'grid-auto-rows'/'grid-auto-columns' properties.
891+
892+
<p>
893+
Numeric indexes in the <i>grid-placement properties</i>
894+
count from the edges of the <i>explicit grid</i>.
895+
Positive indexes count from the before/start side,
896+
while negative indexes count from the after/end side.
897+
879898
<p class='issue'>
880-
Fill in text.
899+
Since all three properties define the explicit grid,
900+
would it make sense to give them all a common prefix
901+
(and possibly a shorthand unifying them, as in <a href="http://dev.w3.org/csswg/css3-layout/#grid-shorthand">Bert's 'grid' shorthand</a>)?
902+
Current thoughts:
903+
'grid-template' as the shorthand, with 'grid-template-rows/columns/slots' as the longhands,
904+
or 'grid-definition' as the shorthand, with 'grid-definition-rows/columns/template' as the longhands.
905+
Other suggestions welcome.
881906

882907
<h3 id='track-sizing'>
883908
Track Sizing: the 'grid-definition-rows' and 'grid-definition-columns' properties</h3>

0 commit comments

Comments
 (0)