Skip to content

Commit 008454d

Browse files
committed
x
1 parent f73c0ca commit 008454d

1 file changed

Lines changed: 11 additions & 19 deletions

File tree

css3-multicol/Overview.html

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -993,42 +993,34 @@ <h3 id=pseudo-algorithm><span class=secno>3.4. </span>Pseudo-algorithm</h3>
993993

994994
<pre>
995995

996-
(01) if ((column-width = auto) and (column-count = auto)) or
997-
(02) ((available-width = unknown) and (column-count = auto)) then
996+
(01) if ((column-width = auto) and (column-count = auto)) then
997+
exit; /* not a multicol element */
998+
999+
(02) if ((available-width = unknown) and (column-count = auto)) then
9981000
(03) exit; /* no columns */
999-
(04) fi
1000-
(05)
1001+
10011002
(06) if (available-width = unknown) and (column-count != auto) and (column-width != auto) then
10021003
(07) N := column-count;
10031004
(08) W := column-width;
10041005
(09) exit;
1005-
(10) fi
10061006

10071007
(12) if (available-width = unknown) then
10081008
(13) available-width := shrink-to-fit;
1009-
(14) fi
10101009

1011-
/* the next block is used when column-count is set, and column-width is auto */
1012-
1013-
(16) if (column-width = auto) then
1010+
(16) if (column-width = auto) and (column-count != auto) then
10141011
(18) N := column-count;
10151012
(19) W := max(0, (available-width - ((N - 1) * column-gap))/N);
10161013
exit;
1017-
fi
10181014

1019-
/* the next block is used when column-width is set, and column-count is auto */
1020-
1021-
(27) if (column-count = auto) then
1015+
(27) if (column-count = auto) and (column-width != auto) then
10221016
(32) N := min(1, floor((available-width + column-gap) / (column-width + column-gap)));
10231017
(33) W := ((available-width + column-gap) / N) - column-gap;
10241018
exit;
1025-
fi
1026-
1027-
/* the next block is used if both column-count and column-width are set */
1028-
1029-
(39) N := min(column-count, floor((available-width + column-gap) / (column-width + column-gap)))
1030-
(40) W := ((available-width + column-gap) / N) - column-gap;
10311019

1020+
if (column-count != auto) and (column-width != auto) then
1021+
(39) N := min(column-count, floor((available-width + column-gap) / (column-width + column-gap)))
1022+
(40) W := ((available-width + column-gap) / N) - column-gap;
1023+
exit
10321024
</pre>
10331025

10341026
<p>In paged media, user agents may perform this calculation on a per-page

0 commit comments

Comments
 (0)