|
10 | 10 | rel=dcterms.rights> |
11 | 11 | <meta content="CSS Multi-column Layout Module" name=dcterms.title> |
12 | 12 | <meta content=text name=dcterms.type> |
13 | | - <meta content=2013-05-10 name=dcterms.date> |
| 13 | + <meta content=2013-06-03 name=dcterms.date> |
14 | 14 | <meta content="Håkon Wium Lie" name=dcterms.creator> |
15 | 15 | <meta content=W3C name=dcterms.publisher> |
16 | 16 | <meta content="http://dev.w3.org/csswg/css3-multicol/" |
|
38 | 38 |
|
39 | 39 | <h1>CSS Multi-column Layout Module</h1> |
40 | 40 |
|
41 | | - <h2 class="no-num no-toc" id=w3c-working>Editor's Draft 10 May 2013</h2> |
| 41 | + <h2 class="no-num no-toc" id=w3c-working>Editor's Draft 3 June 2013</h2> |
42 | 42 |
|
43 | 43 | <dl> |
44 | 44 | <dt>This version: |
45 | 45 |
|
46 | 46 | <dd> |
47 | | - <!--<a href="http://www.w3.org/TR/2013/CR-css3-multicol-20130510">http://dev.w3.org/csswg/css3-multicol/</a>--> |
| 47 | + <!--<a href="http://www.w3.org/TR/2013/CR-css3-multicol-20130603">http://dev.w3.org/csswg/css3-multicol/</a>--> |
48 | 48 | <a |
49 | 49 | href="http://dev.w3.org/csswg/css3-multicol/">http://dev.w3.org/csswg/css3-multicol/</a> |
50 | 50 |
|
@@ -978,55 +978,25 @@ <h3 id=pseudo-algorithm><span class=secno>3.4. </span>Pseudo-algorithm</h3> |
978 | 978 | <p>The <code>floor(X)</code> function returns the largest integer Y ≤ X. |
979 | 979 |
|
980 | 980 | <pre> |
981 | | -(01) if ((column-width = auto) and (column-count = auto)) then |
982 | | -(02) exit; /* not a multicol element */ |
983 | | - |
984 | | -<!-- |
985 | | -(03) if ((available-width = unknown) and (column-count = auto)) then |
986 | | -(04) exit; /* no columns */ |
| 981 | +(01) if column-width = auto then |
| 982 | +(02) N := column-count |
| 983 | +(03) else if column-count = auto then |
| 984 | +(04) N := max(1, |
| 985 | +(05) floor((U + column-gap)/(column-width + column-gap))) |
| 986 | +(06) else |
| 987 | +(07) N := min(column-count, max(1, |
| 988 | +(08) floor((U + column-gap)/(column-width + column-gap)))) |
| 989 | +</pre> |
987 | 990 |
|
988 | | -(05) if (available-width = unknown) and (column-count != auto) and (column-width != auto) then |
989 | | -(06) N := column-count; |
990 | | -(07) W := column-width; |
991 | | -(08) exit; |
| 991 | + <p>And: |
992 | 992 |
|
993 | | -(09) if (available-width = unknown) then |
994 | | -(10) available-width := shrink-to-fit; |
995 | | ---> |
996 | | - |
997 | | -(03) if (column-width = auto) and (column-count != auto) then |
998 | | -(04) N := column-count; |
999 | | -(05) W := max(0, (U - ((N - 1) * column-gap)) / N); |
1000 | | -(06) exit; |
1001 | | - |
1002 | | -(07) if (column-width != auto) and (column-count = auto) then |
1003 | | -(08) N := max(1, floor((U + column-gap) / (column-width + column-gap))); |
1004 | | -(09) W := ((U + column-gap) / N) - column-gap; |
1005 | | -(10) exit; |
1006 | | - |
1007 | | -(11) if (column-width != auto) and (column-count != auto) then |
1008 | | -(12) N := min(column-count, floor((U + column-gap) / (column-width + column-gap))) |
1009 | | -(13) N := max(1, N); |
1010 | | -(14) W := ((U + column-gap) / N) - column-gap; |
1011 | | -(15) exit |
| 993 | + <pre> |
| 994 | +(09) W := max(0, ((U + column-gap)/N - column-gap) |
1012 | 995 | </pre> |
1013 | 996 |
|
1014 | 997 | <p>In paged media, user agents may perform this calculation on a per-page |
1015 | 998 | basis. |
1016 | 999 |
|
1017 | | - <p class=note>Note that, in most cases, only one of ‘<a |
1018 | | - href="#column-width"><code class=property>column-width</code></a>’ and |
1019 | | - ‘<a href="#column-count"><code class=property>column-count</code></a>’ |
1020 | | - affect the layout. If ‘<a href="#column-width"><code |
1021 | | - class=property>column-width</code></a>’ has a value other than ‘<code |
1022 | | - class=css>auto</code>’, ‘<a href="#column-count"><code |
1023 | | - class=property>column-count</code></a>’ indicates the maximum number of |
1024 | | - columns. However, both ‘<a href="#column-width"><code |
1025 | | - class=property>column-width</code></a>’ and ‘<a |
1026 | | - href="#column-count"><code class=property>column-count</code></a>’ are |
1027 | | - honored when the width of the element depends on its contents. This can, |
1028 | | - e.g., be the case for table cells and floats. |
1029 | | - |
1030 | 1000 | <h3 id=stacking-context><span class=secno>3.5. </span>Stacking context</h3> |
1031 | 1001 |
|
1032 | 1002 | <p>All column boxes in a multi-column element are in the same stacking |
|
0 commit comments