Template:Bar box/testcases

Test 1Edit

{{Bar box}}
{{Bar box|bars=<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">foo</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:red; width:30%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">30%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bar</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:green; width:40%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">40%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">baz</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:blue; width:20%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">20%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:orange; width:8%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">8%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:teal; width:2%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">1/50</td>

</tr>|caption=distribution of stuff|float=right|title=Quantity of stuff|titlebar=#DDD}}

{{Bar box}}

Quantity of stuff
foo
30%
bar
40%
baz
20%
bla
8%
bla
1/50
distribution of stuff

{{Bar box/sandbox}}

Quantity of stuff
foo
30%
bar
40%
baz
20%
bla
8%
bla
1/50
distribution of stuff

Test 2Edit

{{Bar box}}
{{Bar box|bars=<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">foo</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:red; width:30%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">30%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bar</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:green; width:40%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">40%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">baz</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:blue; width:20%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">20%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:orange; width:8%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">8%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:teal; width:2%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">1/50</td>

</tr>|caption=distribution of stuff|float=left|title=Quantity of stuff|titlebar=#DDD}}

{{Bar box}}

Quantity of stuff
foo
30%
bar
40%
baz
20%
bla
8%
bla
1/50
distribution of stuff

{{Bar box/sandbox}}

Quantity of stuff
foo
30%
bar
40%
baz
20%
bla
8%
bla
1/50
distribution of stuff

Test 3Edit

{{Bar box}}
{{Bar box|bars=<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">foo</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:red; width:30%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">30%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bar</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:green; width:40%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">40%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">baz</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:blue; width:20%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">20%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:orange; width:8%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">8%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:teal; width:2%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">1/50</td>

</tr>|caption=distribution of stuff|float=none|title=Quantity of stuff|titlebar=#DDD}}

{{Bar box}}

Quantity of stuff
foo
30%
bar
40%
baz
20%
bla
8%
bla
1/50
distribution of stuff

{{Bar box/sandbox}}

Quantity of stuff
foo
30%
bar
40%
baz
20%
bla
8%
bla
1/50
distribution of stuff

Test 4Edit

{{Bar box}}
{{Bar box|bars=<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">foo</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:red; width:30%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">30%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bar</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:green; width:40%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">40%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">baz</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:blue; width:20%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">20%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:orange; width:8%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">8%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:teal; width:2%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">1/50</td>

</tr>|caption=distribution of stuff|float=center|title=Quantity of stuff|titlebar=#DDD}}

{{Bar box}}

Quantity of stuff
foo
30%
bar
40%
baz
20%
bla
8%
bla
1/50
distribution of stuff

{{Bar box/sandbox}}

Quantity of stuff
foo
30%
bar
40%
baz
20%
bla
8%
bla
1/50
distribution of stuff

Test 5Edit

{{Bar box}}
{{Bar box|bars=<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">foo</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:red; width:30%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">30%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bar</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:green; width:40%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">40%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">baz</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:blue; width:20%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">20%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:orange; width:8%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">8%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:teal; width:2%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">1/50</td>

</tr>|caption=distribution of stuff|float=right|title=Quantity of stuff|titlebar=#DDD|width=200px}}

{{Bar box}}

Quantity of stuff
foo
30%
bar
40%
baz
20%
bla
8%
bla
1/50
distribution of stuff

{{Bar box/sandbox}}

Quantity of stuff
foo
30%
bar
40%
baz
20%
bla
8%
bla
1/50
distribution of stuff

Test 6Edit

{{Bar box}}
{{Bar box|bars=<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">foo</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:red; width:30%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">30%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bar</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:green; width:40%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">40%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">baz</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:blue; width:20%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">20%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:orange; width:8%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">8%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:teal; width:2%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">1/50</td>

</tr>|caption=distribution of stuff|float=left|title=Quantity of stuff|titlebar=#DDD|width=200px}}

{{Bar box}}

Quantity of stuff
foo
30%
bar
40%
baz
20%
bla
8%
bla
1/50
distribution of stuff

{{Bar box/sandbox}}

Quantity of stuff
foo
30%
bar
40%
baz
20%
bla
8%
bla
1/50
distribution of stuff

Test 7Edit

{{Bar box}}
{{Bar box|bars=<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">foo</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:red; width:30%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">30%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bar</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:green; width:40%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">40%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">baz</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:blue; width:20%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">20%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:orange; width:8%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">8%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:teal; width:2%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">1/50</td>

</tr>|caption=distribution of stuff|float=none|title=Quantity of stuff|titlebar=#DDD|width=200px}}

{{Bar box}}

Quantity of stuff
foo
30%
bar
40%
baz
20%
bla
8%
bla
1/50
distribution of stuff

{{Bar box/sandbox}}

Quantity of stuff
foo
30%
bar
40%
baz
20%
bla
8%
bla
1/50
distribution of stuff

Test 8Edit

{{Bar box}}
{{Bar box|bars=<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">foo</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:red; width:30%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">30%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bar</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:green; width:40%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">40%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">baz</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:blue; width:20%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">20%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:orange; width:8%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">8%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:teal; width:2%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">1/50</td>

</tr>|caption=distribution of stuff|float=center|title=Quantity of stuff|titlebar=#DDD|width=200px}}

{{Bar box}}

Quantity of stuff
foo
30%
bar
40%
baz
20%
bla
8%
bla
1/50
distribution of stuff

{{Bar box/sandbox}}

Quantity of stuff
foo
30%
bar
40%
baz
20%
bla
8%
bla
1/50
distribution of stuff

Test 9Edit

{{Bar box}}
{{Bar box|bars=<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">foo</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:red; width:30%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">30%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bar</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:green; width:40%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">40%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">baz</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:blue; width:20%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">20%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:orange; width:8%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">8%</td>

</tr>
<tr>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; min-width: 8em;">bla</td>
<td style="width: 100px; border-left: solid 1px silver; border-right: solid 1px silver;"><div style="background:teal; width:2%; overflow: hidden;">&thinsp;</div></td>
<td colspan="2" style="padding-left: 0.4em; padding-right: 0.4em; text-align: right;">1/50</td>

</tr>|caption=distribution of stuff|title=Quantity of stuff|titlebar=#DDD|width=200px}}

{{Bar box}}

Quantity of stuff
foo
30%
bar
40%
baz
20%
bla
8%
bla
1/50
distribution of stuff

{{Bar box/sandbox}}

Quantity of stuff
foo
30%
bar
40%
baz
20%
bla
8%
bla
1/50
distribution of stuff