@@ -92,19 +92,44 @@ Establishing a Subgrid: Per-Axis Proposal</h3>
92
92
93
93
<pre class="propdef">
94
94
Name : grid-template-rows, grid-template-columns
95
- New values : subgrid
95
+ New values : subgrid <<line-name-list>>?
96
96
</pre>
97
97
98
98
<dl dfn-for="grid-template-rows, grid-template-columns" dfn-type=value>
99
- <dt> <dfn>subgrid</dfn>
99
+ <dt> <dfn id="subgrid-listing" >subgrid <<line-name-list>>? </dfn>
100
100
<dd>
101
- Tracks are <a>subgridded</a> in this axis:
102
- the tracks are adopted from the the parent grid tracks that it spans.
103
- If there is no parent grid, equivalent to
101
+ The <dfn value for="grid-template-rows, grid-template-columns">subgrid</dfn> value
102
+ indicates that the grid will adopt the spanned portion of its parent grid in that axis.
103
+ Rather than being specified explicitly,
104
+ the sizes of the grid rows/columns
105
+ will be taken from the parent grid's definition.
106
+
107
+ The <<line-name-list>> argument allows local naming of the grid lines propagated from the parent grid:
108
+ if a <<line-name-list>> is given,
109
+ the specified <<line-names>> s are assigned to the subgrid’s <a>explicit grid lines</a> ,
110
+ one per line, starting with line 1.
111
+ Excess <<line-names>> are ignored.
112
+
113
+ If there is no parent grid,
114
+ this value is equivalent to
104
115
the initial value, ''grid-template-rows/none'' .
105
116
</dl>
106
117
107
- Issue: Add back syntax for overlaying line names.
118
+ The syntax of <<line-name-list>> is defined as follows:
119
+
120
+ <pre class="prod">
121
+ <dfn><line-name-list></dfn> = [ <<line-names>> | <<name-repeat>> ]+
122
+ <dfn><line-names></dfn> = '[' <<custom-ident>> * ']'
123
+ <dfn><name-repeat></dfn> = repeat( [ <positive-integer> | auto-fill ], <line-names>+)
124
+ </pre>
125
+
126
+ The <<name-repeat>> variant of the ''repeat()'' notation
127
+ <!-- is for adding line names to <a href="#subgrids">subgrids</a> and -->
128
+ can only be used with the ''grid-template-rows/subgrid'' keyword:
129
+ it only repeats names.
130
+ The ''auto-fill'' keyword is only valid once per <<line-name-list>> ,
131
+ and repeats enough times for the name list to match the subgrid’s specified <a>grid span</a>
132
+ (falling back to 0 if the span is already fulfilled).
108
133
109
134
<h3 id="subgrid-items">
110
135
Characteristics of a Subgrid Item</h3>
@@ -116,6 +141,7 @@ Characteristics of a Subgrid Item</h3>
116
141
The number of explicit tracks in each subgridded dimension
117
142
is given by its <a>grid span</a> in that dimension,
118
143
rather than by 'grid-template-rows' /'grid-template-columns' .
144
+ The track sizes are governed by the parent grid.
119
145
120
146
<li>
121
147
The <a>grid-placement properties</a> of the <a>subgrid</a> ’s <a>grid items</a>
@@ -128,6 +154,11 @@ Characteristics of a Subgrid Item</h3>
128
154
the subgridded lines
129
155
automatically receive the line names specified on the parent <a>grid</a> .
130
156
157
+ ISSUE: If a <<line-name-list>> is provided,
158
+ should this hide the names received from the parent
159
+ or be in addition to those names?
160
+ (<a href="https://github.com/w3c/csswg-drafts/issues/2622">Issue 2622</a> )
161
+
131
162
<li>
132
163
The <a>subgrid</a> itself lays out as an ordinary <a>grid item</a> in its parent grid,
133
164
but acts as if it was completely empty for sizing purposes
0 commit comments