Skip to content

Commit ddcd3ec

Browse files
committed
[css3-grid-layout] Define order-modified grid order for baseline calculations.
1 parent dbc652f commit ddcd3ec

2 files changed

Lines changed: 31 additions & 8 deletions

File tree

css3-grid-layout/Overview.html

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2498,17 +2498,28 @@ <h3 id=grid-baselines><span class=secno>7.5. </span> Grid Baselines</h3>
24982498
<li> Otherwise, if the grid container has at least one <a
24992499
href="#grid-item"><i>grid item</i></a> whose area intersects the first
25002500
row/column, and the first such <a href="#grid-item"><i>grid item</i></a>
2501-
(in ‘<code class=property>order</code>’-modified document order) has
2502-
a baseline parallel to the relevant axis, the grid container's baseline
2503-
is that baseline.
2501+
(in <a href="#order-modified-grid-order"><i><code
2502+
class=property>order</code>’-modified grid order</i></a>) has a
2503+
baseline parallel to the relevant axis, the grid container's baseline is
2504+
that baseline.
25042505

25052506
<li> Otherwise, the grid container's baseline is <a
25062507
href="http://www.w3.org/TR/css3-writing-modes/#inline-alignment">synthesized</a>
2507-
from the first item's (in ‘<code
2508-
class=property>order</code>’-modified document order) content box, or,
2509-
failing that, from the grid container's content box.
2508+
from the first item's (in <a
2509+
href="#order-modified-grid-order"><i><code
2510+
class=property>order</code>’-modified grid order</i></a>) content box,
2511+
or, failing that, from the grid container's content box.
25102512
</ol>
25112513

2514+
<p> <dfn id=order-modified-grid-order><code
2515+
class=property>order</code>’-modified grid order</dfn> is the order in
2516+
which <a href="#grid-item"><i>grid items</i></a> are encountered when
2517+
traversing the grid's <i>grid cells</i>, in row-major order if calculating
2518+
the inline-axis baseline, or in column-major order if calculating the
2519+
block-axis baseline. If two items are encountered at the same time, they
2520+
are taken in ‘<code class=property>order</code>’-modified document
2521+
order.
2522+
25122523
<p> When calculating the baseline according to the above rules, if the box
25132524
contributing a baseline has an ‘<code class=property>overflow</code>
25142525
value that allows scrolling, the box must be treated as being in its
@@ -3741,6 +3752,10 @@ <h2 class=no-num id=index> Index</h2>
37413752
<li><a href="#none"><code class=css>none</code></a>’, <a href="#none"
37423753
title="section 6.3."><strong>6.3.</strong></a>
37433754

3755+
<li><code class=property>order</code>’-modified grid order, <a
3756+
href="#order-modified-grid-order"
3757+
title="section 7.5."><strong>7.5.</strong></a>
3758+
37443759
<li>RemainingSpace, <a href="#RemainingSpace-definition"
37453760
title="section 8.1."><strong>8.1.</strong></a>
37463761

css3-grid-layout/Overview.src.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1979,16 +1979,24 @@ <h3 id='grid-baselines'>
19791979

19801980
<li>
19811981
Otherwise, if the grid container has at least one <i>grid item</i> whose area intersects the first row/column,
1982-
and the first such <i>grid item</i> (in 'order'-modified document order) has a baseline
1982+
and the first such <i>grid item</i> (in <i>'order'-modified grid order</i>) has a baseline
19831983
parallel to the relevant axis,
19841984
the grid container's baseline is that baseline.
19851985

19861986
<li>
19871987
Otherwise, the grid container's baseline is <a href="http://www.w3.org/TR/css3-writing-modes/#inline-alignment">synthesized</a>
1988-
from the first item's (in 'order'-modified document order) content box,
1988+
from the first item's (in <i>'order'-modified grid order</i>) content box,
19891989
or, failing that, from the grid container's content box.
19901990
</ol>
19911991

1992+
<p>
1993+
<dfn>'order'-modified grid order</dfn> is the order in which
1994+
<i>grid items</i> are encountered when traversing the grid's <i>grid cells</i>,
1995+
in row-major order if calculating the inline-axis baseline,
1996+
or in column-major order if calculating the block-axis baseline.
1997+
If two items are encountered at the same time,
1998+
they are taken in 'order'-modified document order.
1999+
19922000
<p>
19932001
When calculating the baseline according to the above rules,
19942002
if the box contributing a baseline has an 'overflow' value that allows scrolling,

0 commit comments

Comments
 (0)