Skip to content

Commit 0f37650

Browse files
committed
[css-grid-2] Add some IDs for linking.
1 parent f335607 commit 0f37650

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

css-grid-2/Overview.bs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -139,35 +139,37 @@ Characteristics of a Subgrid Item</h3>
139139
A <a>subgrid</a> behaves just like a normal <a>grid container</a> except that:
140140

141141
<ul style="list-style-type: lower-alpha">
142-
<li>
142+
<li id="subgrid-tracks">
143143
The number of explicit tracks in each subgridded dimension
144144
is given by its <a>grid span</a> in that dimension,
145145
rather than by 'grid-template-rows'/'grid-template-columns'.
146146
The track sizes are governed by the parent grid.
147147

148-
<li>
148+
<li id="subgrid-indexing">
149149
The <a>grid-placement properties</a> of the <a>subgrid</a>’s <a>grid items</a>
150150
are scoped to the lines covered by the subgrid.
151151
E.g., numeric indices count starting from the first line of the subgrid
152152
rather than the first line of the parent grid.
153153

154-
<li>
154+
<li id="subgrid-line-name-inheritance">
155155
Since <a>subgrids</a> can be placed before their contents are placed,
156156
the subgridded lines
157157
automatically receive the line names
158158
specified on the corresponding lines of the parent <a>grid</a>.
159159
These names are in <em>addition</em> to
160160
any line names specified locally on the subgrid.
161161

162-
<li>
162+
<li id="subgrid-size-contribution">
163163
The <a>subgrid</a> itself lays out as an ordinary <a>grid item</a> in its parent grid,
164164
but acts as if it was completely empty for sizing purposes
165165
in the subgridded dimension.
166166

167-
<li>The <a>subgrid</a>'s own <a>grid items</a> participate
167+
<li id="subgrid-item-contribution">
168+
The <a>subgrid</a>'s own <a>grid items</a> participate
168169
in the sizing of its parent grid in the subgridded dimension(s)
169170
and are aligned to it in those dimensions.
170171

172+
<p id="subgrid-margins">
171173
In this process, the sum of the <a>subgrid</a>'s
172174
margin, padding, and borders at each edge
173175
are applied as an extra layer of (potentially negative) margin
@@ -203,6 +205,7 @@ Characteristics of a Subgrid Item</h3>
203205
and the <a>grid item's</a> own position.
204206
</div>
205207

208+
<p id="subgrid-gaps">
206209
Meanwhile,
207210
half the size of the difference between
208211
the subgrid’s <a>gutters</a> ('row-gap'/'column-gap')
@@ -321,7 +324,7 @@ Characteristics of a Subgrid Item</h3>
321324
</dl>
322325
</div>
323326

324-
<li>
327+
<li id="subgrid-implicit">
325328
The <a>subgrid</a> does not have any <a>implicit grid tracks</a>
326329
in the subgridded dimension(s);
327330
every <a>grid area</a> within it is <a>clamped</a> to its <a>explicit grid</a>.
@@ -331,18 +334,18 @@ Characteristics of a Subgrid Item</h3>
331334
then that item is instead forced into (and limited to) the first (only) track in the subgrid.
332335
</div>
333336

334-
<li>
337+
<li id="subgrid-box-alignment">
335338
The <a>subgrid</a> is always stretched in its subgridded dimension(s:
336339
the 'align-self'/'justify-self' properties on it are ignored,
337340
as are any specified width/height constraints.
338341

339-
<li>
342+
<li id="subgrid-grid-alignment">
340343
Layoutwise, the <a>subgrid</a>’s <a>grid</a>
341344
is always aligned with the corresponding section of the parent <a>grid</a>;
342345
the 'align-content'/'justify-content' properties on it are also ignored
343346
in the subgridded dimension.
344347

345-
<li>
348+
<li id="subgrid-overflow">
346349
The 'overflow' property does apply to <a>subgrids</a>,
347350
so that overflowing contents of the subgrid can be scrolled into view.
348351
(Note: the act of scrolling does not affect layout.)

0 commit comments

Comments
 (0)