t32-opacity-offscreen-with-alpha-c

opacity

WeasyPrint

This browser

Assertion
That alpha within the offscreen buffer is composited correctly.

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: opacity</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/#transparency">
 8 		<meta name="flags" content="">
 9 		<meta name="assert" content="That alpha within the offscreen buffer is composited correctly.">
10 		<style type="text/css">
11 
12 		body { background: white; }
13 
14 		div { width: 5em; height: 1em; }
15 		div.top { margin: 2px 0; }
16 
17 		</style>
18 	</head>
19 	<body>
20 		<p>The following four boxes should be the same color:</p>
21 
22 		<div class="top" style="background: rgb(204, 204, 255)"></div>
23 		<div class="top" style="opacity: 0.2; background: rgb(0, 0, 255)"></div>
24 		<div class="top" style="opacity: 0.5"><div style="opacity: 0.4; background: rgb(0, 0, 255)"></div></div>
25 		<div class="top" style="opacity: 0.4"><div style="background: rgba(0, 0, 255, 0.5)"></div></div>
26 	</body>
27 </html>