t425-hsla-onscreen-b

hsla() overpainting

WeasyPrint

This browser

Assertion
Test that hsla() does not behave like opacity and draw in an offscreen buffer.

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 Test: hsla() overpainting</title>
 5 		<link rel="author" title="L. David Baron" href="https://dbaron.org/">
 6 		<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/">
 7 		<link rel="help" href="http://www.w3.org/TR/css3-color/#hsla-color">
 8 		<meta name="flags" content="">
 9 		<meta name="assert" content="Test that hsla() does not behave like opacity and draw in an offscreen buffer.">
10 		<style type="text/css">
11 		html, body { background: white; }
12 		table { border-spacing: 0; padding: 0; border: none; }
13 		td { border: none; padding: 0; }
14 
15 		td, div { height: 1.2em; }
16 		</style>
17 	</head>
18 	<body>
19 
20 	<p>Every row in this table should have both columns the same color:</p>
21 
22 	<table>
23 		<tr>
24 			<th style="background:white; color: black">Column 1</th>
25 			<th style="background:black; color: white">Column 2</th>
26 		</tr>
27 		<tr>
28 			<td style="background: hsla(240, 100%, 50%, 0.2)">&nbsp;</td>
29 			<td style="background: rgb(204, 204, 255)">&nbsp;</td>
30 		</tr>
31 		<tr>
32 			<td style="background: hsla(240, 100%, 50%, 0.2)"><div style="background: inherit">&nbsp;</div></td>
33 			<td style="background: rgb(163, 163, 255)">&nbsp;</td>
34 		</tr>
35 		<tr>
36 			<td style="background: hsla(240, 100%, 50%, 0.4)">&nbsp;</td>
37 			<td style="background: rgb(153, 153, 255)">&nbsp;</td>
38 		</tr>
39 		<tr>
40 			<td style="background: hsla(240, 100%, 50%, 0.4)"><div style="background: inherit">&nbsp;</div></td>
41 			<td style="background: rgb(92, 92, 255)">&nbsp;</td>
42 		</tr>
43 		<tr>
44 			<td style="background: hsla(240, 100%, 50%, 0.6)">&nbsp;</td>
45 			<td style="background: rgb(102, 102, 255)">&nbsp;</td>
46 		</tr>
47 		<tr>
48 			<td style="background: hsla(240, 100%, 50%, 0.6)"><div style="background: inherit">&nbsp;</div></td>
49 			<td style="background: rgb(41, 41, 255)">&nbsp;</td>
50 		</tr>
51 		<tr>
52 			<td style="background: hsla(240, 100%, 50%, 0.8)">&nbsp;</td>
53 			<td style="background: rgb(51, 51, 255)">&nbsp;</td>
54 		</tr>
55 		<tr>
56 			<td style="background: hsla(240, 100%, 50%, 0.8)"><div style="background: inherit">&nbsp;</div></td>
57 			<td style="background: rgb(10, 10, 255)">&nbsp;</td>
58 		</tr>
59 	</table>
60 
61 	</body>
62 </html>