Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multicol width tests #11802

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions css/css-multicol/multicol-rule-shorthand-2-ref.xht
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<link rel="author" title="Opera Software ASA" href="http://www.opera.com/"/>
<style><![CDATA[
body {
margin: 0;
margin: 1em;
}
body>div {
font-family: Ahem;
font-size: 1em;
line-height: 1em;
color: black;
background: yellow;
margin: 1em;
margin: 1em 0;
border: 1em solid gray;
width: 15em;
height: 2em;
Expand All @@ -34,7 +34,7 @@ div+div+div {
</head>

<body>

<p>Pass if there is no red visible.</p>
<div>
<div>xx xx</div>
<div class="a">x x</div>
Expand Down
31 changes: 9 additions & 22 deletions css/css-multicol/multicol-rule-shorthand-2.xht
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,38 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>multicolumn | column-rule</title>
<title>CSS Multi-column Layout Test: 'column-rule' shorthand</title>
<link rel="author" title="Opera Software ASA" href="http://www.opera.com/"/>
<link rel="help" href=""/>
<link rel="match" href="multicol-rule-shorthand-2-ref.xht"/>
<meta name="flags" content=""/>
<meta name="assert" content="Tests that column rules are not displayed for invalid properties and values."/>
<meta name="flags" content="invalid"/>
<style type="text/css"><![CDATA[
body {
margin: 0;
margin: 1em;
}
body>div {
font-family: Ahem;
font-size: 1em;
line-height: 1em;
color: black;
background: yellow;
margin: 1em;
margin: 1em 0;
border: 1em solid gray;
width: 15em;
orphans: 1;
widows: 1;

column-count: 4;
column-gap: 1em;
column-rule: solid blue 1em;
column-rule: normal red 1em;
column: normal red 1em;
}
span {
background: blue;
position: absolute;
top: 0;
left: 3em;
height: 2em;
width: 1em;
}
span+span {
left: 7em;
}
span+span+span {
left: 11em;
column-rule: normal red 1em; /* invalid: 'normal' is not a 'border-style' */
column: normal red 1em; /* invalid: 'column' is not a valid property name; 'normal' can only apply to 'column-gap' */
}

]]></style>
</head>

<body>
<p>Pass if there is no red visible.</p>

<div>
xx xx
Expand Down
10 changes: 2 additions & 8 deletions css/css-multicol/multicol-width-001-ref.xht
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,17 @@
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-23 -->
<meta name="flags" content="ahem" />
<style type="text/css"><![CDATA[
body
div
{
font: 1.25em/1 Ahem;
width: 30em;
}

div
{
background-color: yellow;
color: black;
orphans: 1;
widows: 1;
}
]]></style>
</head>
<body>

<p>Test passes if it is identical to the reference.</p>
<div>d da&nbsp; d da&nbsp; d da&nbsp; d da&nbsp; d da&nbsp;<br />

dam&nbsp;&nbsp; dam&nbsp;&nbsp; dam&nbsp;&nbsp; dam&nbsp;&nbsp; dam&nbsp;&nbsp;<br />
Expand Down
12 changes: 4 additions & 8 deletions css/css-multicol/multicol-width-001.xht
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,25 @@
<title>CSS Multi-column Layout Test: column-width (basic)</title>
<link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-23 -->
<link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" title="3. The number and width of columns" />
<link rel="help" href="https://www.w3.org/TR/css-multicol-1/#the-number-and-width-of-columns" title="The number and width of columns" />
<link rel="match" href="multicol-width-001-ref.xht" />
<meta name="assert" content="Tests that column-width is calculated correctly."/>
<meta name="flags" content="ahem" />
<style type="text/css"><![CDATA[
body
div
{
font: 1.25em/1 Ahem;
width: 30em;
}

div
{
background-color: yellow;
color: black;
orphans: 1;
widows: 1;

column-gap: 0;
column-width: 6em;
}
]]></style>
</head>
<body>
<p>Test passes if it is identical to the reference.</p>
<div>
d da dam dame damer
d da dam dame damer
Expand Down
1 change: 1 addition & 0 deletions css/css-multicol/multicol-width-002-ref.xht
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
]]></style>
</head>
<body>
<p>Test passes if there are two black bars and two blue bars with a yellow stripe to the right of each bar, matching reference.</p>
<table>
<tr>
<td><img src="support/black20x20.png" width="40" height="40" alt="Image download support must be enabled" /></td>
Expand Down
6 changes: 3 additions & 3 deletions css/css-multicol/multicol-width-002.xht
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
<title>CSS Multi-column Layout Test: column-width (basic)</title>
<link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-23 -->
<link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" title="3. The number and width of columns" />
<link rel="help" href="https://www.w3.org/TR/css-multicol-1/#the-number-and-width-of-columns" title="The number and width of columns" />
<link rel="match" href="multicol-width-002-ref.xht" />
<meta name="assert" content="Tests that column-width is calculated correctly."/>
<meta name="flags" content="ahem" />
<style type="text/css"><![CDATA[
div
Expand All @@ -14,8 +15,6 @@
border: gray solid 1em;
color: black;
font: 1.25em/1 Ahem;
orphans: 1;
widows: 1;
width: 12em;

column-gap: 0;
Expand All @@ -26,6 +25,7 @@
]]></style>
</head>
<body>
<p>Test passes if there are two black bars and two blue bars with a yellow stripe to the right of each bar, matching reference.</p>
<div>
bl ac bl ac
<span>
Expand Down
14 changes: 6 additions & 8 deletions css/css-multicol/multicol-width-003.xht
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
<title>CSS Multi-column Layout Test: column-width (basic)</title>
<link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-23 -->
<link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" title="3. The number and width of columns" />
<link rel="help" href="https://www.w3.org/TR/css-multicol-1/#the-multi-column-model" title="The Multi-column Model" />
<link rel="match" href="multicol-width-002-ref.xht" />
<meta name="flags" content="ahem" />
<meta name="assert" content="Test to check that the multicol container and not the column box becomes the containing box"/>
<style type="text/css"><![CDATA[
div#multi-column
{
Expand All @@ -15,11 +16,8 @@
color: black;
font: 1.25em/1 Ahem;
height: 2em;
orphans: 1;
position: relative;
widows: 1;
width: 12em;

column-width: 6em;
column-gap: 0;
}
Expand All @@ -33,23 +31,23 @@
width: 2em;
}

div#s2 {left: 3em;}
div#s2 {right: 7em;}

div#s3
{
background-color: blue;
left: 6em;
right: 4em;
}

div#s4
{
background-color: blue;
left: 9em;
right: 1em;
}
]]></style>
</head>
<body>

<p>Test passes if there are two black bars and two blue bars with a yellow stripe to the right of each bar, matching reference.</p>
<div id="multi-column">
<div></div>
<div id="s2"></div>
Expand Down
8 changes: 4 additions & 4 deletions css/css-multicol/multicol-width-ch-001.xht
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>multicolumn | column-width</title>
<title>CSS Multi-column Layout Test: column-width (ch units)</title>
<link rel="author" title="Opera Software ASA" href="http://www.opera.com/"/>
<link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns"/>
<link rel="help" href="https://www.w3.org/TR/css-multicol-1/#the-number-and-width-of-columns"/>
<link rel="match" href="multicol-width-ch-ref.xht"/>
<meta name="flags" content=""/>
<meta name="assert" value="Test that the ch unit can be used as a value for column-width."/>
<style type="text/css"><![CDATA[
.multicol {
font: 1em monospace;
width: 69ch;
column-width: 13ch;
column-gap: 1ch;
orphans: 1;
widows: 1;
background: yellow;
}
]]></style>
</head>

<body>
<p>Test passes if we have five columns with four lines in each. The final column should contain the words: million, billion, trillion.</p>
<div class="multicol">
one two three four
five six seven eight
Expand Down
1 change: 1 addition & 0 deletions css/css-multicol/multicol-width-ch-ref.xht
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
</head>

<body>
<p>Test passes if we have five columns with four lines in each. The final column should contain the words: million, billion, trillion.</p>
<div class="multicol-ref">
<span>
one two three four
Expand Down
15 changes: 5 additions & 10 deletions css/css-multicol/multicol-width-count-001.xht
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,25 @@
<title>CSS Multi-column Layout Test: column-count and column-width (basic)</title>
<link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-23 -->
<link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" title="3. The number and width of columns" />
<link rel="help" href="https://www.w3.org/TR/css-multicol-1/#the-number-and-width-of-columns" title="3. The number and width of columns" />
<link rel="match" href="multicol-width-001-ref.xht" />
<meta name="asset" content="Test that column-count and column-width are valid in combination"/>
<meta name="flags" content="ahem" />
<style type="text/css"><![CDATA[
body
div
{
font: 1.25em/1 Ahem;
width: 30em;
}

div
{
background-color: yellow;
color: black;
orphans: 1;
widows: 1;

column-count: 5;
column-gap: 0;
column-width: 6em;
column-width: 5em;
}
]]></style>
</head>
<body>
<p>Test passes if it is identical to the reference.</p>
<div>
d da dam dame damer
d da dam dame damer
Expand Down
6 changes: 3 additions & 3 deletions css/css-multicol/multicol-width-count-002.xht
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
<title>CSS Multi-column Layout Test: column-count and column-width (basic)</title>
<link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-23 -->
<link rel="help" href="http://www.w3.org/TR/css3-multicol/#cc" title="3.2 'column-count'" />
<link rel="help" href="https://www.w3.org/TR/css-multicol-1/#cc" title="3.2 'column-count'" />
<link rel="match" href="multicol-count-002-ref.xht" />
<meta name="asset" content="Test that column-count acts as a max when combined with column-width."/>
<meta name="flags" content="ahem" />
<style type="text/css"><![CDATA[
html {background-color: white;}
Expand All @@ -22,10 +23,9 @@
{
background-color: yellow;
color: black;

column-count: 4;
column-gap: 0;
column-width: 5em;
column-width: 4em; /* would create 5 columns if column-count was not acting as a max */
}
]]></style>
</head>
Expand Down
1 change: 1 addition & 0 deletions css/css-multicol/multicol-width-invalid-001-ref.xht
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
]]></style>
</head>
<body>
<p>This test passes is it is idential to the reference.</p>
<table>
<tr>
<td><img src="support/black20x20.png" width="40" height="20" alt="Image download support must be enabled" /></td>
Expand Down
7 changes: 3 additions & 4 deletions css/css-multicol/multicol-width-invalid-001.xht
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>CSS Multi-column Layout Test: invalid column-width</title>
<link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-23 -->
<link rel="help" href="http://www.w3.org/TR/css3-multicol/#cw" title="3.1. 'column-width'" />
<link rel="help" href="https://www.w3.org/TR/css-multicol-1/#cw" title="3.1. 'column-width'" />
<link rel="match" href="multicol-width-invalid-001-ref.xht" />
<meta name="flags" content="ahem invalid" />
<meta name="assert" content="This test checks that 'column-width: bzzt' is invalid (generating a parsing error) and therefore will be ignored." />
Expand All @@ -15,18 +15,17 @@
border: gray solid 1em;
color: black;
font: 1.25em/1 Ahem;
orphans: 1;
widows: 1;
width: 12em;

column-gap: 0;
column-width: bzzt;
column-width: bzzt; /* this value is invalid */
}

span {color: blue;}
]]></style>
</head>
<body>
<p>This test passes is it is idential to the reference.</p>
<div>
bl ac
<span>
Expand Down
5 changes: 2 additions & 3 deletions css/css-multicol/multicol-width-large-001.xht
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>CSS Multi-column Layout Test: large column-width</title>
<link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-23 -->
<link rel="help" href="http://www.w3.org/TR/css3-multicol/#cw" title="3.1. 'column-width'" />
<link rel="help" href="https://www.w3.org/TR/css-multicol-1/#cw" title="3.1. 'column-width'" />
<link rel="match" href="multicol-width-invalid-001-ref.xht" />
<meta name="flags" content="ahem" />
<meta name="assert" content="This test checks that a set 'column-width' may be wider (to fill the available space). In this test, the actual column-width will be increased to 12em." />
Expand All @@ -15,8 +15,6 @@
border: gray solid 1em;
color: black;
font: 1.25em/1 Ahem;
orphans: 1;
widows: 1;
width: 12em;

column-gap: 0;
Expand All @@ -27,6 +25,7 @@
]]></style>
</head>
<body>
<p>This test passes is it is idential to the reference.</p>
<div>
bl ac
<span>
Expand Down
Loading