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
along the <ahref=http://www.w3.org/TR/css3-writing-modes/#inline-axis>inline axis</a> (the <dfndata-dfn-type=dfndata-export="" id=row-axis>row axis<aclass=self-linkhref=#row-axis></a></dfn>).
<imgalt="Image: A diagram illustrating the relationship between the Grid Element and its Tracks, Lines, Areas and Items." class=figuresrc=images/grid-concepts.png>
495
+
<pclass=caption>A diagram illustrating the relationship between the <adata-link-type=dfnhref=#grid-containertitle="grid container">grid container</a> and its tracks, lines, areas and items.
is not rendered, as if it were <aclass="css css-code" data-link-type=propertyhref=http://www.w3.org/TR/CSS21/visuren.html#propdef-displaytitle=display>display:none</a>.
695
+
is not rendered, as if it were <aclass=cssdata-link-type=propdeschref=http://www.w3.org/TR/CSS21/visuren.html#propdef-displaytitle=display>display:none</a>.
692
696
693
697
<p>
694
698
A <adata-link-type=dfnhref=#grid-itemtitle="grid item">grid item</a> establishes a new formatting context for its contents.
For example, a misparented <spanclass=cssdata-link-type=maybetitle=table-cell>table-cell</span> child is fixed up
729
733
by <ahref=http://www.w3.org/TR/CSS21/tables.html#anonymous-boxes>generating anonymous <spanclass=cssdata-link-type=maybetitle=table>table</span> and <spanclass=cssdata-link-type=maybetitle=table-row>table-row</span> elements</a> around it. <adata-biblio-type=normativedata-link-type=bibliohref=#css21title=css21>[CSS21]</a>
730
734
This fixup must occur <em>before</em> a <adata-link-type=dfnhref=#grid-containertitle="grid container">grid container</a>’s children are promoted to <adata-link-type=dfnhref=#grid-itemtitle="grid items">grid items</a>.
731
-
For example, given two contiguous child elements with <aclass="css css-code" data-link-type=propertyhref=http://www.w3.org/TR/CSS21/visuren.html#propdef-displaytitle=display>display:table-cell</a>,
735
+
For example, given two contiguous child elements with <aclass=cssdata-link-type=propdeschref=http://www.w3.org/TR/CSS21/visuren.html#propdef-displaytitle=display>display:table-cell</a>,
732
736
an anonymous table wrapper box around them becomes the <adata-link-type=dfnhref=#grid-itemtitle="grid item">grid item</a>.
Subgrids: the <aclass=cssdata-link-for=grid-template-rowsdata-link-type=maybehref=#valuedef-subgrid0title=subgrid>subgrid</a> keyword</span><aclass=self-linkhref=#subgrids></a></h4>
1036
1040
1037
1041
<p>
1038
-
A <adata-link-type=dfnhref=#grid-itemtitle="grid item">grid item</a> can itself be a <adata-link-type=dfnhref=#grid-containertitle="grid container">grid container</a> by giving it <aclass="css css-code" data-link-type=propertyhref=http://www.w3.org/TR/CSS21/visuren.html#propdef-displaytitle=display>display: grid</a>;
1042
+
A <adata-link-type=dfnhref=#grid-itemtitle="grid item">grid item</a> can itself be a <adata-link-type=dfnhref=#grid-containertitle="grid container">grid container</a> by giving it <aclass=cssdata-link-type=propdeschref=http://www.w3.org/TR/CSS21/visuren.html#propdef-displaytitle=display>display: grid</a>;
1039
1043
in this case the layout of its contents will be independent of the layout of the grid it participates in.
<p>In addition to accepting the <aclass=propertydata-link-type=propdeschref=#propdef-grid-templatetitle=grid-template>grid-template</a> shorthand syntax for setting up the <adata-link-type=dfnhref=#explicit-gridtitle="explicit grid">explicit grid</a>,
1744
1748
the <aclass=propertydata-link-type=propdeschref=#propdef-gridtitle=grid>grid</a> shorthand can also easily set up parameters for an auto-formatted grid.
1745
-
For example, <aclass="css css-code" data-link-type=propertyhref=#propdef-gridtitle=grid>grid: rows 1fr;</a> is equivalent to
1749
+
For example, <aclass=cssdata-link-type=propdeschref=#propdef-gridtitle=grid>grid: rows 1fr;</a> is equivalent to
1746
1750
<pre>grid-template: none;
1747
1751
grid-auto-columns: 1fr;
1748
1752
grid-auto-rows: 1fr;
1749
-
grid-auto-flow: rows;</pre><p>Similarly, <aclass="css css-code" data-link-type=propertyhref=#propdef-gridtitle=grid>grid: columns 1fr / auto</a> is equivalent to
1753
+
grid-auto-flow: rows;</pre><p>Similarly, <aclass=cssdata-link-type=propdeschref=#propdef-gridtitle=grid>grid: columns 1fr / auto</a> is equivalent to
contributes the first such line to the <adata-link-type=dfnhref=#grid-itemtitle="grid item">grid item</a>’s <adata-link-type=dfnhref=#grid-placementplacementtitle=placement>placement</a>.
2012
2016
2013
2017
<pclass=note> Note: <adata-link-type=dfnhref=#named-grid-areatitle="named grid areas">Named grid areas</a> automatically generate <adata-link-type=dfnhref=#implicit-named-linetitle="implicit named lines">implicit named lines</a> of this form,
2014
-
so specifying <aclass="css css-code" data-link-type=propertyhref=#propdef-grid-row-starttitle=grid-row-start>grid-row-start: foo</a> will choose the start edge of that <adata-link-type=dfnhref=#named-grid-areatitle="named grid area">named grid area</a>
2018
+
so specifying <aclass=cssdata-link-type=propdeschref=#propdef-grid-row-starttitle=grid-row-start>grid-row-start: foo</a> will choose the start edge of that <adata-link-type=dfnhref=#named-grid-areatitle="named grid area">named grid area</a>
2015
2019
(unless another line named <spanclass=cssdata-link-type=maybetitle=foo-start>foo-start</span> was explicitly specified before it).
2016
2020
2017
2021
<p> Otherwise, if there is a <adata-link-type=dfnhref=#named-linetitle="named line">named line</a> with the specified name,
<li>Refined <ahref=#abspos-items>definitions of absolutely-positioned elements</a> whose containing block is a grid container.
2936
2940
<li>Defined the <ahref=#static-position>static position</a> of direct children of a <adata-link-type=dfnhref=#grid-containertitle="grid container">grid container</a>.
2937
2941
<li>Added an option for dense packing to <aclass=propertydata-link-type=propdeschref=#propdef-grid-auto-flowtitle=grid-auto-flow>grid-auto-flow</a>.
2938
-
<li>Proposed <aclass=propertydata-link-type=propdeschref=#propdef-grid-auto-positiontitle=grid-auto-position>grid-auto-position</a> property so that auto-stacking items can be controlled a bit better. (But see open issues on changing <aclass="css css-code" data-link-type=propertyhref=#propdef-grid-auto-flowtitle=grid-auto-flow>grid-auto-flow: none</a>.)
2942
+
<li>Proposed <aclass=propertydata-link-type=propdeschref=#propdef-grid-auto-positiontitle=grid-auto-position>grid-auto-position</a> property so that auto-stacking items can be controlled a bit better. (But see open issues on changing <aclass=cssdata-link-type=propdeschref=#propdef-grid-auto-flowtitle=grid-auto-flow>grid-auto-flow: none</a>.)
2939
2943
<li>Rewrote and fixed errors in the <ahref=#auto-placement-algo>auto-placement algorithm</a>.
2940
2944
<li>Marked <ahref=#visibility-collapse>grid row/column collapsing</a> as an open issue.
Win8 compat might require the <aclass=css-codedata-link-for=grid-auto-flowdata-link-type=valuehref=#valuedef-nonetitle=none>none</a> value to stay the initial value,
3223
3227
but it’s not a very good value,
3224
3228
because by default the entire contents of a grid container will end up stacked on top of each other.
3225
3229
See <ahref=http://lists.w3.org/Archives/Public/www-archive/2013Aug/0024.html>proposals to address this</a>
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>?
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.
Copy file name to clipboardExpand all lines: css-grid/Overview.src.html
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1813,9 +1813,9 @@ <h2 id="placement">
1813
1813
1814
1814
1815
1815
1816
-
The <dfnexporttitle="grid-placement property">grid-placement properties</dfn><!--
1817
-
-->—<wbr>the longhands 'grid-row-start', 'grid-row-end', 'grid-column-start', 'grid-column-end', and their shorthands 'grid-row', 'grid-column', and 'grid-area'—<wbr><!--
1818
-
-->allow the author to specify a <i>grid item</i>’s <i>placement</i>
1816
+
The <dfnexporttitle="grid-placement property">grid-placement properties</dfn>--
1817
+
the longhands 'grid-row-start', 'grid-row-end', 'grid-column-start', 'grid-column-end', and their shorthands 'grid-row', 'grid-column', and 'grid-area'--
1818
+
allow the author to specify a <i>grid item</i>’s <i>placement</i>
1819
1819
by providing any (or none) of the following six pieces of information:
0 commit comments