Skip to content

Commit 1d173bd

Browse files
committed
[css-grid] Add issues for examples todo in abspos section.
1 parent 0f16cf7 commit 1d173bd

2 files changed

Lines changed: 123 additions & 58 deletions

File tree

css-grid/Overview.html

Lines changed: 75 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -132,18 +132,18 @@ <h2 class="no-num no-toc no-ref heading settled heading" id=contents><span class
132132
Auto Sizing Subgrids</a></ul><li><a href=#line-placement><span class=secno>8.2</span>
133133
Line-based Placement: the <span class=property data-link-type=propdesc title=grid-row-start>grid-row-start</span>, <span class=property data-link-type=propdesc title=grid-column-start>grid-column-start</span>, <span class=property data-link-type=propdesc title=grid-row-end>grid-row-end</span>, and <span class=property data-link-type=propdesc title=grid-column-end>grid-column-end</span> properties</a><ul class=toc><li><a href=#grid-placement-errors><span class=secno>8.2.1</span>
134134
Grid Placement Error Handling</a></ul><li><a href=#placement-shorthands><span class=secno>8.3</span>
135-
Placement Shorthands: the <span class=property data-link-type=propdesc title=grid-column>grid-column</span>, <span class=property data-link-type=propdesc title=grid-row>grid-row</span>, and <span class=property data-link-type=propdesc title=grid-area>grid-area</span> properties</a></ul><li><a href=#abspos-items><span class=secno>9</span>
136-
Absolutely-positioned Grid Items</a><li><a href=#alignment><span class=secno>10</span>
137-
Alignment</a><ul class=toc><li><a href=#auto-margins><span class=secno>10.1</span>
138-
Aligning with <span data-link-for=margin data-link-type=value title=auto>auto</span> margins</a><li><a href=#row-align><span class=secno>10.2</span>
139-
Row-axis Alignment: the <span class=property data-link-type=propdesc title=justify-self>justify-self</span> and <span class=property data-link-type=propdesc title=justify-items>justify-items</span> properties</a><li><a href=#column-align><span class=secno>10.3</span>
140-
Column-axis Alignment: the <span class=property data-link-type=propdesc title=align-self>align-self</span> and <span class=property data-link-type=propdesc title=align-items>align-items</span> properties</a><li><a href=#z-order><span class=secno>10.4</span>
141-
Z-axis Ordering: the <span class=property data-link-type=propdesc title=z-index>z-index</span> property</a><li><a href=#grid-baselines><span class=secno>10.5</span>
142-
Grid Baselines</a></ul><li><a href=#layout-algorithm><span class=secno>11</span>
143-
Grid Layout Algorithm</a><ul class=toc><li><a href=#algo-terms><span class=secno>11.1</span>
144-
Definition of Terms for use in Calculating Grid Track Sizes</a><li><a href=#track-sizing-algorithm><span class=secno>11.2</span>
145-
Grid Track Sizing Algorithm</a><li><a href=#shrink-to-fit><span class=secno>11.3</span>
146-
Defining the Shrink-to-fit Behavior of Grid Elements</a></ul><li><a href=#pagination><span class=secno>12</span>
135+
Placement Shorthands: the <span class=property data-link-type=propdesc title=grid-column>grid-column</span>, <span class=property data-link-type=propdesc title=grid-row>grid-row</span>, and <span class=property data-link-type=propdesc title=grid-area>grid-area</span> properties</a><li><a href=#abspos-items><span class=secno>8.4</span>
136+
Absolutely-positioned Grid Items</a></ul><li><a href=#alignment><span class=secno>9</span>
137+
Alignment</a><ul class=toc><li><a href=#auto-margins><span class=secno>9.1</span>
138+
Aligning with <span data-link-for=margin data-link-type=value title=auto>auto</span> margins</a><li><a href=#row-align><span class=secno>9.2</span>
139+
Row-axis Alignment: the <span class=property data-link-type=propdesc title=justify-self>justify-self</span> and <span class=property data-link-type=propdesc title=justify-items>justify-items</span> properties</a><li><a href=#column-align><span class=secno>9.3</span>
140+
Column-axis Alignment: the <span class=property data-link-type=propdesc title=align-self>align-self</span> and <span class=property data-link-type=propdesc title=align-items>align-items</span> properties</a><li><a href=#z-order><span class=secno>9.4</span>
141+
Z-axis Ordering: the <span class=property data-link-type=propdesc title=z-index>z-index</span> property</a><li><a href=#grid-baselines><span class=secno>9.5</span>
142+
Grid Baselines</a></ul><li><a href=#layout-algorithm><span class=secno>10</span>
143+
Grid Layout Algorithm</a><ul class=toc><li><a href=#algo-terms><span class=secno>10.1</span>
144+
Definition of Terms for use in Calculating Grid Track Sizes</a><li><a href=#track-sizing-algorithm><span class=secno>10.2</span>
145+
Grid Track Sizing Algorithm</a><li><a href=#shrink-to-fit><span class=secno>10.3</span>
146+
Defining the Shrink-to-fit Behavior of Grid Elements</a></ul><li><a href=#pagination><span class=secno>11</span>
147147
Fragmenting Grid Layout</a><li><a href=#acks><span class=secno></span>
148148
Acknowledgements</a><li><a href=#changes><span class=secno></span>
149149
Changes</a><li><a href=#conformance><span class=secno></span>
@@ -2172,24 +2172,54 @@ <h3 class="heading settled heading" data-level=8.3 id=placement-shorthands><span
21722172
Should <a class=property data-link-type=propdesc href=#propdef-grid-area title=grid-area>grid-area</a> be <a class=property data-link-type=propdesc title=grid-field>grid-field</a>?
21732173

21742174

2175-
<h2 class="heading settled heading" data-level=9 id=abspos-items><span class=secno>9 </span><span class=content>
2176-
Absolutely-positioned Grid Items</span><a class=self-link href=#abspos-items></a></h2>
2175+
<h3 class="heading settled heading" data-level=8.4 id=abspos-items><span class=secno>8.4 </span><span class=content>
2176+
Absolutely-positioned Grid Items</span><a class=self-link href=#abspos-items></a></h3>
21772177

2178-
<p>
2179-
If an absolutely positioned element’s <a data-link-type=dfn title="containing block">containing block</a>
2180-
is generated by a <a data-link-type=dfn href=#grid-container title="grid container">grid container</a>,
2181-
the <a data-link-type=dfn href=#grid-placement-property title="grid-placement properties">grid-placement properties</a> can be used to constrain it to a particular <a data-link-type=dfn href=#grid-area title="grid area">grid area</a>,
2182-
similar to how they affect regular <a data-link-type=dfn href=#grid-item title="grid items">grid items</a>.
2183-
In this case, an <a class=css-code data-link-for="<grid-line>" data-link-type=value href=#grid-placement-auto title=auto>auto</a> value for a <a data-link-type=dfn href=#grid-placement-property title="grid-placement property">grid-placement property</a>
2184-
indicates the corresponding padding edge of the <a data-link-type=dfn href=#grid-container title="grid container">grid container</a>.
2178+
<p> If an absolutely positioned element’s <a data-link-type=dfn title="containing block">containing block</a>
2179+
is generated by a <a data-link-type=dfn href=#grid-container title="grid container">grid container</a>,
2180+
the <a data-link-type=dfn href=#grid-placement-property title="grid-placement properties">grid-placement properties</a> can be used to constrain it to a particular <a data-link-type=dfn href=#grid-area title="grid area">grid area</a>,
2181+
similar to how they affect regular <a data-link-type=dfn href=#grid-item title="grid items">grid items</a>.
2182+
In this case, an <a class=css-code data-link-for="<grid-line>" data-link-type=value href=#grid-placement-auto title=auto>auto</a> value for a <a data-link-type=dfn href=#grid-placement-property title="grid-placement property">grid-placement property</a>
2183+
indicates the corresponding padding edge of the <a data-link-type=dfn href=#grid-container title="grid container">grid container</a>.
21852184

2186-
<p class=note>
2187-
Note that, while absolutely-positioning an element to a <a data-link-type=dfn href=#grid-container title="grid container">grid container</a>
2188-
does allow it to align to that container’s <a data-link-type=dfn href=#grid-line title="grid lines">grid lines</a>,
2189-
such elements
2190-
do not take up space or otherwise participate in the layout of the grid.
2185+
<p class=note> Note: Note that, while absolutely-positioning an element to a <a data-link-type=dfn href=#grid-container title="grid container">grid container</a>
2186+
does allow it to align to that container’s <a data-link-type=dfn href=#grid-line title="grid lines">grid lines</a>,
2187+
such elements
2188+
do not take up space or otherwise participate in the layout of the grid.
2189+
2190+
<div class=example>
2191+
<pre class=example> .grid {
2192+
display: grid;
2193+
grid: ...;
2194+
position: relative; /* containing block */
2195+
}
2196+
.abspos {
2197+
position: absolute;
2198+
top: 0;
2199+
left: 0;
2200+
right: 0;
2201+
bottom: 0;
2202+
grid-row: 2 / -1;
2203+
grid-column:
2204+
}
2205+
</pre> </div>
2206+
2207+
<p class=issue id=issue-382f79cc><a class=self-link href=#issue-382f79cc></a>
2208+
<ul>
2209+
<li>Simple example of abspos spanning the whole grid.
2210+
<li>Example of abspos spanning a portion of the grid.
2211+
<li>Example of abspos using its offsets.
2212+
<li>Complex example of a centered grid interacting with abspos doing both padding-edge and explicit lines.
2213+
<pre> .grid {
2214+
justify-content: center;
2215+
}
2216+
.abspos {
2217+
grid-row: 2 / -1;
2218+
grid-column: auto / span 2;
2219+
}
2220+
</pre> </ul>
21912221

2192-
<h2 class="heading settled heading" data-level=10 id=alignment><span class=secno>10 </span><span class=content>
2222+
<h2 class="heading settled heading" data-level=9 id=alignment><span class=secno>9 </span><span class=content>
21932223
Alignment</span><a class=self-link href=#alignment></a></h2>
21942224

21952225
<p>
@@ -2212,7 +2242,7 @@ <h2 class="heading settled heading" data-level=10 id=alignment><span class=secno
22122242
<a data-link-type=dfn href=#grid-item title="grid items">grid items</a> will auto-size to fit their contents.
22132243

22142244

2215-
<h3 class="heading settled heading" data-level=10.1 id=auto-margins><span class=secno>10.1 </span><span class=content>
2245+
<h3 class="heading settled heading" data-level=9.1 id=auto-margins><span class=secno>9.1 </span><span class=content>
22162246
Aligning with <a class=css-code data-link-for=margin data-link-type=value title=auto>auto</a> margins</span><a class=self-link href=#auto-margins></a></h3>
22172247

22182248
<p>
@@ -2246,7 +2276,7 @@ <h3 class="heading settled heading" data-level=10.1 id=auto-margins><span class=
22462276
</div>
22472277

22482278

2249-
<h3 class="heading settled heading" data-level=10.2 id=row-align><span class=secno>10.2 </span><span class=content>
2279+
<h3 class="heading settled heading" data-level=9.2 id=row-align><span class=secno>9.2 </span><span class=content>
22502280
Row-axis Alignment: the <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-align-3/#justify-self title=justify-self>justify-self</a> and <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-align-3/#justify-items title=justify-items>justify-items</a> properties</span><a class=self-link href=#row-align></a></h3>
22512281

22522282
<p>
@@ -2267,7 +2297,7 @@ <h3 class="heading settled heading" data-level=10.2 id=row-align><span class=sec
22672297

22682298

22692299

2270-
<h3 class="heading settled heading" data-level=10.3 id=column-align><span class=secno>10.3 </span><span class=content>
2300+
<h3 class="heading settled heading" data-level=9.3 id=column-align><span class=secno>9.3 </span><span class=content>
22712301
Column-axis Alignment: the <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-align-3/#align-self title=align-self>align-self</a> and <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-align-3/#align-items title=align-items>align-items</a> properties</span><a class=self-link href=#column-align></a></h3>
22722302

22732303
<p>
@@ -2277,7 +2307,7 @@ <h3 class="heading settled heading" data-level=10.3 id=column-align><span class=
22772307
or <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-align-3/#align-items title=align-items>align-items</a> property on the <a data-link-type=dfn href=#grid-container title="grid container">grid container</a>,
22782308
as defined in <a data-biblio-type=normative data-link-type=biblio href=#css3-align title=css3-align>[CSS3-ALIGN]</a>.
22792309

2280-
<h3 class="heading settled heading" data-level=10.4 id=z-order><span class=secno>10.4 </span><span class=content>
2310+
<h3 class="heading settled heading" data-level=9.4 id=z-order><span class=secno>9.4 </span><span class=content>
22812311
Z-axis Ordering: the <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-position-3/#z-index title=z-index>z-index</a> property</span><a class=self-link href=#z-order></a></h3>
22822312

22832313

@@ -2332,7 +2362,7 @@ <h3 class="heading settled heading" data-level=10.4 id=z-order><span class=secno
23322362
&lt;div id="E"&gt;E&lt;/div&gt;
23332363
&lt;/div&gt;</pre> </div>
23342364

2335-
<h3 class="heading settled heading" data-level=10.5 id=grid-baselines><span class=secno>10.5 </span><span class=content>
2365+
<h3 class="heading settled heading" data-level=9.5 id=grid-baselines><span class=secno>9.5 </span><span class=content>
23362366
Grid Baselines</span><a class=self-link href=#grid-baselines></a></h3>
23372367

23382368
<p>
@@ -2381,10 +2411,10 @@ <h3 class="heading settled heading" data-level=10.5 id=grid-baselines><span clas
23812411

23822412

23832413

2384-
<h2 class="heading settled heading" data-level=11 id=layout-algorithm><span class=secno>11 </span><span class=content>
2414+
<h2 class="heading settled heading" data-level=10 id=layout-algorithm><span class=secno>10 </span><span class=content>
23852415
Grid Layout Algorithm</span><a class=self-link href=#layout-algorithm></a></h2>
23862416

2387-
<h3 class="heading settled heading" data-level=11.1 id=algo-terms><span class=secno>11.1 </span><span class=content>
2417+
<h3 class="heading settled heading" data-level=10.1 id=algo-terms><span class=secno>10.1 </span><span class=content>
23882418
Definition of Terms for use in Calculating Grid Track Sizes</span><a class=self-link href=#algo-terms></a></h3>
23892419

23902420
<dl>
@@ -2410,7 +2440,7 @@ <h3 class="heading settled heading" data-level=11.1 id=algo-terms><span class=se
24102440
</dl>
24112441

24122442

2413-
<h3 class="heading settled heading" data-level=11.2 id=track-sizing-algorithm><span class=secno>11.2 </span><span class=content>
2443+
<h3 class="heading settled heading" data-level=10.2 id=track-sizing-algorithm><span class=secno>10.2 </span><span class=content>
24142444
Grid Track Sizing Algorithm</span><a class=self-link href=#track-sizing-algorithm></a></h3>
24152445
<ol>
24162446
<li>Call ComputedUsedBreadthOfGridTracks for Grid Columns to resolve their logical width.
@@ -2857,14 +2887,14 @@ <h3 class="heading settled heading" data-level=11.2 id=track-sizing-algorithm><s
28572887
</dl>
28582888
</dl>
28592889

2860-
<h3 class="heading settled heading" data-level=11.3 id=shrink-to-fit><span class=secno>11.3 </span><span class=content>
2890+
<h3 class="heading settled heading" data-level=10.3 id=shrink-to-fit><span class=secno>10.3 </span><span class=content>
28612891
Defining the Shrink-to-fit Behavior of Grid Elements</span><a class=self-link href=#shrink-to-fit></a></h3>
28622892

28632893
<p>
28642894
The <a href=http://www.w3.org/TR/css3-box/#shrink-to-fit>CSS3 Box Model</a> defines the shrink-to-fit behavior of an element as min(max(preferred minimum width, available width), preferred width), with available width defined in the Box Model spec. Accordingly, for the <a data-link-type=dfn href=#grid-container title="grid container">grid container</a> we define the preferred minimum width as the sum of the UsedBreadths of the <a data-link-type=dfn href=#grid-track title="grid tracks">Grid tracks</a> just before step 3 in ComputeUsedBreadthOfGridTracks, and the preferred width as the sum of the UsedBreadths of the <a data-link-type=dfn href=#grid-track title="grid tracks">Grid tracks</a> after the entire track sizing algorithm has been run with infinite space.
28652895

28662896

2867-
<h2 class="heading settled heading" data-level=12 id=pagination><span class=secno>12 </span><span class=content>
2897+
<h2 class="heading settled heading" data-level=11 id=pagination><span class=secno>11 </span><span class=content>
28682898
Fragmenting Grid Layout</span><a class=self-link href=#pagination></a></h2>
28692899

28702900
<p class=issue id=issue-b68a497e><a class=self-link href=#issue-b68a497e></a>
@@ -3045,7 +3075,7 @@ <h2 class="no-num no-ref heading settled heading" id=index><span class=content>
30453075
<li>auto-placement, <a href=#auto-placementauto-placement-algorithm title="section 6.2.1">6.2.1</a>
30463076
<li>auto-placement algorithm, <a href=#auto-placementauto-placement-algorithm title="section 6.2.1">6.2.1</a>
30473077
<li>auto-placement cursor, <a href=#auto-placement-cursor title="section 6.2.1">6.2.1</a>
3048-
<li>AvailableSpace, <a href=#AvailableSpace-definition title="section 11.1">11.1</a>
3078+
<li>AvailableSpace, <a href=#AvailableSpace-definition title="section 10.1">10.1</a>
30493079
<li>column, <a href=#grid-column--column title="section 2">2</a>
30503080
<li>column axis, <a href=#column-axis title="section 2">2</a>
30513081
<li>columns, <a href=#valuedef-columns title="section 6.2">6.2</a>
@@ -3113,28 +3143,28 @@ <h2 class="no-num no-ref heading settled heading" id=index><span class=content>
31133143
<li>&lt;line-name-list&gt;, <a href=#typedef-line-name-list title="section 5.1">5.1</a>
31143144
<li>&lt;line-names&gt;, <a href=#typedef-line-names title="section 5.1">5.1</a>
31153145
<li>max-content, <a href=#valuedef-max-content title="section 5.1">5.1</a>
3116-
<li>MaxTrackSizingFunction, <a href=#MaxTrackSizingFunction-definition title="section 11.1">11.1</a>
3146+
<li>MaxTrackSizingFunction, <a href=#MaxTrackSizingFunction-definition title="section 10.1">10.1</a>
31173147
<li>min-content, <a href=#valuedef-min-content title="section 5.1">5.1</a>
31183148
<li>minmax(), <a href=#valuedef-minmax title="section 5.1">5.1</a>
3119-
<li>MinTrackSizingFunction, <a href=#MinTrackSizingFunction-definition title="section 11.1">11.1</a>
3149+
<li>MinTrackSizingFunction, <a href=#MinTrackSizingFunction-definition title="section 10.1">10.1</a>
31203150
<li>named grid area, <a href=#named-grid-area title="section 5.2">5.2</a>
31213151
<li>named line, <a href=#named-line title="section 5.1.1">5.1.1</a>
31223152
<li>none<ul><li>value for grid-template-rows, grid-template-columns, <a href=#valuedef-none0 title="section 5.1">5.1</a>
31233153
<li>value for grid-template-areas, <a href=#valuedef-none1 title="section 5.2">5.2</a>
31243154
<li>value for grid-template, <a href=#valuedef-none2 title="section 5.3">5.3</a>
31253155
<li>value for grid-auto-flow, <a href=#valuedef-none title="section 6.2">6.2</a>
31263156
</ul><li>occupied grid cell, <a href=#occupied-grid-cell title="section 6.2.1">6.2.1</a>
3127-
<li>order-modified grid order, <a href=#order-modified-grid-order title="section 10.5">10.5</a>
3128-
<li>participates in baseline alignment, <a href=#baseline-participation title="section 10.5">10.5</a>
3157+
<li>order-modified grid order, <a href=#order-modified-grid-order title="section 9.5">9.5</a>
3158+
<li>participates in baseline alignment, <a href=#baseline-participation title="section 9.5">9.5</a>
31293159
<li>&lt;percentage&gt;, <a href=#valuedef-percentage title="section 5.1">5.1</a>
31303160
<li>placement, <a href=#grid-placementplacement title="section 8">8</a>
3131-
<li>RemainingSpace, <a href=#RemainingSpace-definition title="section 11.1">11.1</a>
3161+
<li>RemainingSpace, <a href=#RemainingSpace-definition title="section 10.1">10.1</a>
31323162
<li>repeat(), <a href=#funcdef-repeat title="section 5.1.2">5.1.2</a>
31333163
<li>row, <a href=#grid-row--row title="section 2">2</a>
31343164
<li>row axis, <a href=#row-axis title="section 2">2</a>
31353165
<li>rows, <a href=#valuedef-rows title="section 6.2">6.2</a>
31363166
<li>sizing function, <a href=#sizing-function title="section 5.1">5.1</a>
3137-
<li>SpanCount, <a href=#SpanCount-definition title="section 11.1">11.1</a>
3167+
<li>SpanCount, <a href=#SpanCount-definition title="section 10.1">10.1</a>
31383168
<li>span &amp;&amp; [ &lt;integer&gt; || &lt;ident&gt; ], <a href=#grid-placement-span-int title="section 8.2">8.2</a>
31393169
<li>&lt;string&gt;+, <a href=#valuedef-string title="section 5.2">5.2</a>
31403170
<li>subgrid<ul><li>value for grid-template-rows, grid-template-columns, <a href=#valuedef-subgrid title="section 5.1">5.1</a>
@@ -3196,6 +3226,7 @@ <h2 class="no-num heading settled" id=issues-index><span class=content>Issues In
31963226

31973227

31983228
<a href=#issue-6466e536></a><p class=issue>
3229+
<a href=#issue-382f79cc></a><p class=issue>
31993230
Currently this algorithm embodies several heuristics which regulate the growth of spanning <a data-link-type=dfn href=#grid-item title="grid items">Grid items</a> to accommodate certain use cases. (E.g. the game example in Figures 2 and 3 above.) These heuristics should be a normative part of this specification to ensure interoperability. To the extent additional use cases can be identified that cannot be satisfied by following the current heuristics, the normative algorithm can be updated, or additional mechanisms can be introduced for fine-grained control of content-based TrackSizingFunction.
32003231

32013232
<a href=#issue-a01f80c8></a><p class=issue>

0 commit comments

Comments
 (0)