multicol-reduce-000

column width becomes wider to fill available space

WeasyPrint

Reference (good) by WeasyPrint

Reference (good) by this browser

This browser

Flags
ahem
Assertion
This test checks that column width is increased to fill the available space: in this test, there are only 2 column boxes.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3  <head>
 4   <title>CSS Multi-column Layout Test: column width becomes wider to fill available space</title>
 5   <link rel="author" title="Hakon Wium Lie" href="mailto:howcome@opera.com">
 6   <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <!-- 2013-08-25 -->
 7   <link rel="help" href="http://www.w3.org/TR/css3-multicol/#cw" title="3.1 'column-width'">
 8   <link rel="match" href="reference/multicol-reduce-000-ref.htm">
 9   <meta name="flags" content="ahem">
10   <meta name="assert" content="This test checks that column width is increased to fill the available space: in this test, there are only 2 column boxes.">
11   <style type="text/css">
12   div#test, div#reference
13   {
14   background-color: yellow;
15   border: black solid thin;
16   color: orange;
17   font: 1.25em/1 Ahem;
18   margin-bottom: 0.5em;
19   width: 30em;
20   }
21 
22   div#test
23   {
24   column-gap: 0;
25   column-width: 201px;
26 
27   /*
28 
29   N == max(1, floor((U + column-gap)/(column-width + column-gap)))
30   N == max(1, floor((600px + 0px)/(201px + 0)))
31   N == max(1, floor(600px/201px))
32   N == max(1, floor(2.985))
33   N == max(1, 2)
34   N == 2;
35 
36   W == max(0, ((U + column-gap)/N - column-gap))
37   W == max(0, ((600px + 0px)/2 - 0px))
38   W == max(0, ((600px)/2 - 0px))
39   W == max(0, (300px - 0px))
40   W == max(0, 300px)
41   W == 300px;
42 
43   */
44   }
45 
46   span {color: blue;}
47   </style>
48  </head>
49  <body>
50 
51   <p>Test passes if the 2 rectangles with orange and blue vertical stripes are <strong>identical</strong>.</p>
52 
53   <div id="test">
54   1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 <span>A B C D E F G H I J K L M N O P</span>
55   </div>
56 
57   <div id="reference">
58   1 2 3 4 5 6 7 8<span>A B C D E F G H </span><br>
59   9 0 1 2 3 4 5 6<span>I J K L M N O P </span>
60   </div>
61 
62  </body>
63 </html>