Skip to content

Commit 3ab2268

Browse files
committed
[css3-layout] Mentioned the suggested 'dense' keyword for the
automatic placement algorithm as an issue. --HG-- extra : rebase_source : f6e2b6a6dd58a7a3707bd869c9c1beb4ae0f4f9a
1 parent 9462c76 commit 3ab2268

1 file changed

Lines changed: 30 additions & 19 deletions

File tree

css-template/Overview.src.html

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2224,7 +2224,8 @@ <h3>Stacking elements on top of a grid: 'grid-area' and 'grid-auto'</h3>
22242224
<table class=propdef>
22252225
<tbody>
22262226
<tr><th>Name: <td><dfn>grid-auto</dfn>
2227-
<tr><th><a href="#values" >Value</a>: <td>none | rows | columns
2227+
<tr><th><a href="#values" >Value</a>: <td>none
2228+
| [ rows && dense? ] | [ columns && dense? ]
22282229
<tr><th>Initial: <td>none
22292230
<tr><th>Applies to: <td>elements that have a <span>grid
22302231
ancestor</span> and whose 'position' is equal to 'grid'
@@ -2350,16 +2351,28 @@ <h3>Stacking elements on top of a grid: 'grid-area' and 'grid-auto'</h3>
23502351

23512352
<dt>rows
23522353
<dd>
2353-
<p>The element is positioned as high as possible in the grid (and if
2354-
there are multiple solutions at the same height: as far to the left as
2355-
possible) such that is doesn't overlap with any earlier elements in
2356-
the document that have the same <em>grid ancestor</em> and 'grid-area'
2357-
other then ''none''. More precisely: the element is placed as for
2358-
'grid-area: <var>x</var> <var>y</var> <var>W</var> <var>H</var>', where
2359-
<var>x</var> and <var>y</var> are chosen as follows: <span
2360-
class=issue>Define. Tight packing (i.e., closest to top left corner)
2361-
or preserve element order (i.e., to the right or below of previous
2362-
element)?</span>
2354+
<p>Loosely: the element is positioned in the currently last row, to
2355+
the right of all elements in the row, unless it doesn't fit, in which
2356+
case it is positioned in the first column of a newly created row.
2357+
2358+
<p>More precisely: let (<var>x</var><sub><var>i</var></sub>,
2359+
<var>y</var><sub><var>i</var></sub>,
2360+
<var>W</var><sub><var>i</var></sub>,
2361+
<var>H</var><sub><var>i</var></sub>) be the columns, rows, widths and
2362+
heights of element <var>i</var> for all elements that come earlier in
2363+
the document and that are positioned in the current grid with
2364+
'grid-area'. Let <var>L</var> =
2365+
max<sub><var>i</var></sub>(<var>y</var><sub><var>i</var></sub>). If
2366+
there are no <var>i</var>, then <var>L</var> = 1. One can think of
2367+
<var>L</var> as the row that is currently being filled. Let
2368+
<var>C</var> = max<sub>j</sub>(<var>x</var><sub><var>j</var></sub> +
2369+
<var>W</var><sub><var>j</var></sub>) for all <var>j</var> such that
2370+
<var>y</var><sub><var>j</var></sub> = L. If there are no <var>j</var>,
2371+
then <var>C</var> = 1. This is the next available column in the
2372+
current row. Then the element is positioned at (<var>L</var>,
2373+
<var>C</var>) if <var>C</var> = 1 or <var>C</var> + <var>W</var> is
2374+
less then the <em>number of columns</em> and it is positioned at
2375+
(<var>L</var> + 1, 1) otherwise.
23632376

23642377
<p>The name 'rows' comes from the fact that this algorithms tends to
23652378
fill a row with subsequent elements and then adds new rows
@@ -2369,14 +2382,12 @@ <h3>Stacking elements on top of a grid: 'grid-area' and 'grid-auto'</h3>
23692382

23702383
<dt>columns
23712384
<dd>
2372-
<p>The element is positioned as far to the left as possible in the
2373-
grid (and if there are multiple solutions: as high as possible) such
2374-
that is doesn't overlap with any earlier elements in the document that
2375-
have the same <em>grid ancestor</em> and 'grid-area' other then
2376-
''none''. More precisely: the element is placed as for 'grid-area:
2377-
<var>x</var> <var>y</var> <var>W</var> <var>H</var>', where
2378-
<var>x</var> and <var>y</var> are chosen as follows: <span
2379-
class=issue>define</span>
2385+
<p class=issue>Analogous…
2386+
2387+
<dt>dense
2388+
<dd>
2389+
<p>The element is positioned in the first available unused space in
2390+
the grid. <span class=issue>Drop? or define?</span>
23802391
</dl>
23812392

23822393
<p class=issue>The pair of keywords ''same/next'' and the pair

0 commit comments

Comments
 (0)