You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto Sizing Subgrids</a></ul><li><ahref=#line-placement><spanclass=secno>8.2</span>
133
133
Line-based Placement: the <spanclass=propertydata-link-type=propdesctitle=grid-row-start>grid-row-start</span>, <spanclass=propertydata-link-type=propdesctitle=grid-column-start>grid-column-start</span>, <spanclass=propertydata-link-type=propdesctitle=grid-row-end>grid-row-end</span>, and <spanclass=propertydata-link-type=propdesctitle=grid-column-end>grid-column-end</span> properties</a><ulclass=toc><li><ahref=#grid-placement-errors><spanclass=secno>8.2.1</span>
Placement Shorthands: the <spanclass=propertydata-link-type=propdesctitle=grid-column>grid-column</span>, <spanclass=propertydata-link-type=propdesctitle=grid-row>grid-row</span>, and <spanclass=propertydata-link-type=propdesctitle=grid-area>grid-area</span> properties</a></ul><li><ahref=#abspos-items><spanclass=secno>9</span>
Aligning with <spandata-link-for=margindata-link-type=valuetitle=auto>auto</span> margins</a><li><ahref=#row-align><spanclass=secno>10.2</span>
139
-
Row-axis Alignment: the <spanclass=propertydata-link-type=propdesctitle=justify-self>justify-self</span> and <spanclass=propertydata-link-type=propdesctitle=justify-items>justify-items</span> properties</a><li><ahref=#column-align><spanclass=secno>10.3</span>
140
-
Column-axis Alignment: the <spanclass=propertydata-link-type=propdesctitle=align-self>align-self</span> and <spanclass=propertydata-link-type=propdesctitle=align-items>align-items</span> properties</a><li><ahref=#z-order><spanclass=secno>10.4</span>
141
-
Z-axis Ordering: the <spanclass=propertydata-link-type=propdesctitle=z-index>z-index</span> property</a><li><ahref=#grid-baselines><spanclass=secno>10.5</span>
Defining the Shrink-to-fit Behavior of Grid Elements</a></ul><li><ahref=#pagination><spanclass=secno>12</span>
135
+
Placement Shorthands: the <spanclass=propertydata-link-type=propdesctitle=grid-column>grid-column</span>, <spanclass=propertydata-link-type=propdesctitle=grid-row>grid-row</span>, and <spanclass=propertydata-link-type=propdesctitle=grid-area>grid-area</span> properties</a><li><ahref=#abspos-items><spanclass=secno>8.4</span>
Aligning with <spandata-link-for=margindata-link-type=valuetitle=auto>auto</span> margins</a><li><ahref=#row-align><spanclass=secno>9.2</span>
139
+
Row-axis Alignment: the <spanclass=propertydata-link-type=propdesctitle=justify-self>justify-self</span> and <spanclass=propertydata-link-type=propdesctitle=justify-items>justify-items</span> properties</a><li><ahref=#column-align><spanclass=secno>9.3</span>
140
+
Column-axis Alignment: the <spanclass=propertydata-link-type=propdesctitle=align-self>align-self</span> and <spanclass=propertydata-link-type=propdesctitle=align-items>align-items</span> properties</a><li><ahref=#z-order><spanclass=secno>9.4</span>
141
+
Z-axis Ordering: the <spanclass=propertydata-link-type=propdesctitle=z-index>z-index</span> property</a><li><ahref=#grid-baselines><spanclass=secno>9.5</span>
Should <aclass=propertydata-link-type=propdeschref=#propdef-grid-areatitle=grid-area>grid-area</a> be <aclass=propertydata-link-type=propdesctitle=grid-field>grid-field</a>?
If an absolutely positioned element’s <adata-link-type=dfntitle="containing block">containing block</a>
2180
-
is generated by a <adata-link-type=dfnhref=#grid-containertitle="grid container">grid container</a>,
2181
-
the <adata-link-type=dfnhref=#grid-placement-propertytitle="grid-placement properties">grid-placement properties</a> can be used to constrain it to a particular <adata-link-type=dfnhref=#grid-areatitle="grid area">grid area</a>,
2182
-
similar to how they affect regular <adata-link-type=dfnhref=#grid-itemtitle="grid items">grid items</a>.
2183
-
In this case, an <aclass=css-codedata-link-for="<grid-line>" data-link-type=valuehref=#grid-placement-autotitle=auto>auto</a> value for a <adata-link-type=dfnhref=#grid-placement-propertytitle="grid-placement property">grid-placement property</a>
2184
-
indicates the corresponding padding edge of the <adata-link-type=dfnhref=#grid-containertitle="grid container">grid container</a>.
2178
+
<p> If an absolutely positioned element’s <adata-link-type=dfntitle="containing block">containing block</a>
2179
+
is generated by a <adata-link-type=dfnhref=#grid-containertitle="grid container">grid container</a>,
2180
+
the <adata-link-type=dfnhref=#grid-placement-propertytitle="grid-placement properties">grid-placement properties</a> can be used to constrain it to a particular <adata-link-type=dfnhref=#grid-areatitle="grid area">grid area</a>,
2181
+
similar to how they affect regular <adata-link-type=dfnhref=#grid-itemtitle="grid items">grid items</a>.
2182
+
In this case, an <aclass=css-codedata-link-for="<grid-line>" data-link-type=valuehref=#grid-placement-autotitle=auto>auto</a> value for a <adata-link-type=dfnhref=#grid-placement-propertytitle="grid-placement property">grid-placement property</a>
2183
+
indicates the corresponding padding edge of the <adata-link-type=dfnhref=#grid-containertitle="grid container">grid container</a>.
2185
2184
2186
-
<pclass=note>
2187
-
Note that, while absolutely-positioning an element to a <adata-link-type=dfnhref=#grid-containertitle="grid container">grid container</a>
2188
-
does allow it to align to that container’s <adata-link-type=dfnhref=#grid-linetitle="grid lines">grid lines</a>,
2189
-
such elements
2190
-
do not take up space or otherwise participate in the layout of the grid.
2185
+
<pclass=note> Note: Note that, while absolutely-positioning an element to a <adata-link-type=dfnhref=#grid-containertitle="grid container">grid container</a>
2186
+
does allow it to align to that container’s <adata-link-type=dfnhref=#grid-linetitle="grid lines">grid lines</a>,
2187
+
such elements
2188
+
do not take up space or otherwise participate in the layout of the grid.
Row-axis Alignment: the <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-align-3/#justify-selftitle=justify-self>justify-self</a> and <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-align-3/#justify-itemstitle=justify-items>justify-items</a> properties</span><aclass=self-linkhref=#row-align></a></h3>
Column-axis Alignment: the <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-align-3/#align-selftitle=align-self>align-self</a> and <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-align-3/#align-itemstitle=align-items>align-items</a> properties</span><aclass=self-linkhref=#column-align></a></h3>
or <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-align-3/#align-itemstitle=align-items>align-items</a> property on the <adata-link-type=dfnhref=#grid-containertitle="grid container">grid container</a>,
2278
2308
as defined in <adata-biblio-type=normativedata-link-type=bibliohref=#css3-aligntitle=css3-align>[CSS3-ALIGN]</a>.
Z-axis Ordering: the <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-position-3/#z-indextitle=z-index>z-index</a> property</span><aclass=self-linkhref=#z-order></a></h3>
Defining the Shrink-to-fit Behavior of Grid Elements</span><aclass=self-linkhref=#shrink-to-fit></a></h3>
2862
2892
2863
2893
<p>
2864
2894
The <ahref=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 <adata-link-type=dfnhref=#grid-containertitle="grid container">grid container</a> we define the preferred minimum width as the sum of the UsedBreadths of the <adata-link-type=dfnhref=#grid-tracktitle="grid tracks">Grid tracks</a> just before step 3 in ComputeUsedBreadthOfGridTracks, and the preferred width as the sum of the UsedBreadths of the <adata-link-type=dfnhref=#grid-tracktitle="grid tracks">Grid tracks</a> after the entire track sizing algorithm has been run with infinite space.
Currently this algorithm embodies several heuristics which regulate the growth of spanning <adata-link-type=dfnhref=#grid-itemtitle="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.
0 commit comments