FFFF [css-grid] Tweak the error-correction behavior for not enough grid li… · w3c/csswg-drafts@2a1b683 · GitHub
Skip to content

Commit 2a1b683

Browse files
committed
[css-grid] Tweak the error-correction behavior for not enough grid lines of a given name to be consistent and obviously wrong.
1 parent 904acca commit 2a1b683

2 files changed

Lines changed: 12 additions & 30 deletions

File tree

css-grid/Overview.bs

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2091,19 +2091,16 @@ Line-based Placement: the 'grid-row-start', 'grid-column-start', 'grid-row-end',
20912091
<dl dfn-for="<grid-line>" dfn-type=value>
20922092
<dt><dfn id='grid-placement-slot'><<custom-ident>></dfn>
20932093
<dd>
2094-
First attempts to match the <i>grid area</i>’s edge to a <i>named grid area</i>:
2094+
First attempt to match the <i>grid area</i>’s edge to a <i>named grid area</i>:
20952095
if there is a <a>named line</a> with the name ''<<custom-ident>>-start'' (for 'grid-*-start') / ''<<custom-ident>>-end'' (for 'grid-*-end'),
20962096
contributes the first such line to the <a>grid item</a>’s <a>placement</a>.
20972097

20982098
Note: <a>Named grid areas</a> automatically generate <a>implicit named lines</a> of this form,
20992099
so specifying ''grid-row-start: foo'' will choose the start edge of that <a>named grid area</a>
21002100
(unless another line named ''foo-start'' was explicitly specified before it).
21012101

2102-
Otherwise, if there is a <a>named line</a> with the specified name,
2103-
contributes the first such line to the <a>grid item</a>’s <a>placement</a>.
2104-
21052102
Otherwise,
2106-
the property contributes nothing (just as if <a value for="<grid-line>">auto</a> were specified).
2103+
treat this as if the integer ''1'' had been specified along with the <<custom-ident>>.
21072104

21082105
<dt><dfn id='grid-placement-int'><<integer>> && <<custom-ident>>?</dfn>
21092106
<dd>
@@ -2114,12 +2111,8 @@ Line-based Placement: the 'grid-row-start', 'grid-column-start', 'grid-row-end',
21142111

21152112
If a name is given as a <<custom-ident>>,
21162113
only lines with that name are counted.
2117-
(If no line with that name exists,
2118-
it instead specifies the first grid line;
2119-
or the last, if the <<integer>> is negative.
2120-
If not enough lines of that name exist,
2121-
it specifies the <em>last</em> such named line;
2122-
or the first, if the <<integer>> is negative.)
2114+
If not enough lines with that name exist,
2115+
all lines in the implicit grid are assumed to have that name for the purpose of finding this position.
21232116

21242117
A <<integer>> value of zero makes the declaration invalid.
21252118

@@ -2130,10 +2123,8 @@ Line-based Placement: the 'grid-row-start', 'grid-column-start', 'grid-row-end',
21302123

21312124
If a name is given as a <<custom-ident>>,
21322125
only lines with that name are counted.
2133-
(If no line with that name exists,
2134-
the name is ignored.
2135-
If not enough lines of that name exist,
2136-
it spans to the last such named line in the spanning direction.)
2126+
If not enough lines with that name exist,
2127+
all lines in the implicit grid are assumed to have that name for the purpose of counting this span.
21372128

21382129
If the <<integer>> is omitted, it defaults to ''1''.
21392130
Negative integers or zero are invalid.

css-grid/Overview.html

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2165,19 +2165,16 @@ <h3 class="heading settled heading" data-level=8.2 id=line-placement><span class
21652165
<dl data-dfn-for="<grid-line>" data-dfn-type=value>
21662166
<dt><dfn class=css-code data-dfn-for="<grid-line>" data-dfn-type=value data-export="" id=grid-placement-slot><a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#identifier-value title="<custom-ident>">&lt;custom-ident&gt;</a><a class=self-link href=#grid-placement-slot></a></dfn>
21672167
<dd>
2168-
First attempts to match the <a data-link-type=dfn href=#grid-area title="grid area">grid area</a>’s edge to a <a data-link-type=dfn href=#named-grid-area title="named grid area">named grid area</a>:
2168+
First attempt to match the <a data-link-type=dfn href=#grid-area title="grid area">grid area</a>’s edge to a <a data-link-type=dfn href=#named-grid-area title="named grid area">named grid area</a>:
21692169
if there is a <a data-link-type=dfn href=#named-line title="named line">named line</a> with the name ''<a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#identifier-value title="<custom-ident>">&lt;custom-ident&gt;</a>-start<span class=css data-link-type=maybe title=" (for grid-*-start) / "> (for <a class=property data-link-type=propdesc title=grid-*-start>grid-*-start</a>) / </span><a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#identifier-value title="<custom-ident>">&lt;custom-ident&gt;</a>-end'' (for <a class=property data-link-type=propdesc title=grid-*-end>grid-*-end</a>),
21702170
contributes the first such line to the <a data-link-type=dfn href=#grid-item title="grid item">grid item</a>’s <a data-link-type=dfn href=#grid-placement title=placement>placement</a>.
21712171

21722172
<p class=note>Note: <a data-link-type=dfn href=#named-grid-area title="named grid areas">Named grid areas</a> automatically generate <a data-link-type=dfn href=#implicit-named-line title="implicit named lines">implicit named lines</a> of this form,
21732173
so specifying <a class=css data-link-type=propdesc href=#propdef-grid-row-start title=grid-row-start>grid-row-start: foo</a> will choose the start edge of that <a data-link-type=dfn href=#named-grid-area title="named grid area">named grid area</a>
21742174
(unless another line named <span class=css data-link-type=maybe title=foo-start>foo-start</span> was explicitly specified before it).</p>
21752175

2176-
<p>Otherwise, if there is a <a data-link-type=dfn href=#named-line title="named line">named line</a> with the specified name,
2177-
contributes the first such line to the <a data-link-type=dfn href=#grid-item title="grid item">grid item</a>’s <a data-link-type=dfn href=#grid-placement title=placement>placement</a>.</p>
2178-
21792176
<p>Otherwise,
2180-
the property contributes nothing (just as if <a class=css-code data-link-for="<grid-line>" data-link-type=value href=#grid-placement-auto title=auto>auto</a> were specified).</p>
2177+
treat this as if the integer <span class=css data-link-type=maybe title=1>1</span> had been specified along with the <a < CB92 /span>class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#identifier-value title="<custom-ident>">&lt;custom-ident&gt;</a>.</p>
21812178

21822179
<dt><dfn class=css-code data-dfn-for="<grid-line>" data-dfn-type=value data-export="" id=grid-placement-int><a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-syntax-3/#typedef-integer title="<integer>">&lt;integer&gt;</a> &amp;&amp; <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#identifier-value title="<custom-ident>">&lt;custom-ident&gt;</a>?<a class=self-link href=#grid-placement-int></a></dfn>
21832180
<dd>
@@ -2188,12 +2185,8 @@ <h3 class="heading settled heading" data-level=8.2 id=line-placement><span class
21882185

21892186
<p>If a name is given as a <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#identifier-value title="<custom-ident>">&lt;custom-ident&gt;</a>,
21902187
only lines with that name are counted.
2191-
(If no line with that name exists,
2192-
it instead specifies the first grid line;
2193-
or the last, if the <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-syntax-3/#typedef-integer title="<integer>">&lt;integer&gt;</a> is negative.
2194-
If not enough lines of that name exist,
2195-
it specifies the <em>last</em> such named line;
2196-
or the first, if the <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-syntax-3/#typedef-integer title="<integer>">&lt;integer&gt;</a> is negative.)</p>
2188+
If not enough lines with that name exist,
2189+
all lines in the implicit grid are assumed to have that name for the purpose of finding this position.</p>
21972190

21982191
<p>A <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-syntax-3/#typedef-integer title="<integer>">&lt;integer&gt;</a> value of zero makes the declaration invalid.</p>
21992192

@@ -2204,10 +2197,8 @@ <h3 class="heading settled heading" data-level=8.2 id=line-placement><span class
22042197

22052198
<p>If a name is given as a <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#identifier-value title="<custom-ident>">&lt;custom-ident&gt;</a>,
22062199
only lines with that name are counted.
2207-
(If no line with that name exists,
2208-
the name is ignored.
2209-
If not enough lines of that name exist,
2210-
it spans to the last such named line in the spanning direction.)</p>
2200+
If not enough lines with that name exist,
2201+
all lines in the implicit grid are assumed to have that name for the purpose of counting this span.</p>
22112202

22122203
<p>If the <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-syntax-3/#typedef-integer title="<integer>">&lt;integer&gt;</a> is omitted, it defaults to <span class=css data-link-type=maybe title=1>1</span>.
22132204
Negative integers or zero are invalid.</p>

0 commit comments

Comments
 (0)