t422-rgba-clip-outside-device-gamut-b

rgba() clipping outside device gamut

WeasyPrint

Reference (good) by WeasyPrint

Reference (good) by this browser

This browser

Assertion
Test clipping of rgba() values outside the device gamut.

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: rgba() clipping outside device gamut</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/#rgba-color">
 8 		<link rel="match" href="reference/t422-rgba-clip-outside-device-gamut-b-ref.htm">
 9 		<meta name="flags" content="">
10 		<meta name="assert" content="Test clipping of rgba() values outside the device gamut.">
11 		<style type="text/css">
12 
13 		body { background: white; color: black; }
14 		table { border-spacing: 0 2px; padding: 0; border: none; }
15 		td { border: none; padding: 0; height: 1.2em; }
16 
17 		</style>
18 	</head>
19 	<body>
20 
21 	<p><strong>WARNING: This test assumes that the device gamut is sRGB
22 	(as it will be for many CRT monitors).</strong></p>
23 
24 	<p>Every row in this table should have both columns the same color:</p>
25 
26 	<table>
27 		<tr>
28 			<th style="background:white; color: black">Column 1</th>
29 			<th style="background:black; color: white">Column 2</th>
30 		</tr>
31 		<tr>
32 			<td style="background: rgba(-30, 500, -1, 0.6)">&nbsp;</td>
33 			<td style="background: rgb(102, 255, 102)">&nbsp;</td>
34 		</tr>
35 		<tr>
36 			<td style="background: rgba(-260, -254, 300, 0.4)">&nbsp;</td>
37 			<td style="background: rgb(153, 153, 255)">&nbsp;</td>
38 		</tr>
39 		<tr>
40 			<td style="background: rgba(-254, 256, 0, 0.6)">&nbsp;</td>
41 			<td style="background: rgb(102, 255, 102)">&nbsp;</td>
42 		</tr>
43 		<tr>
44 			<td style="background: rgba(-10%, 200%, -1%, 0.4)">&nbsp;</td>
45 			<td style="background: rgb(153, 255, 153)">&nbsp;</td>
46 		</tr>
47 		<tr>
48 			<td style="background: rgba(-110%, 130%, -99%, 0.6)">&nbsp;</td>
49 			<td style="background: rgb(102, 255, 102)">&nbsp;</td>
50 		</tr>
51 		<tr>
52 			<td style="background: rgba(-99%, 101%, 0%, 0.4)">&nbsp;</td>
53 			<td style="background: rgb(153, 255, 153)">&nbsp;</td>
54 		</tr>
55 		<tr>
56 			<td style="background: rgba(50, -30, 255, 0.6)">&nbsp;</td>
57 			<td style="background: rgb(132, 102, 255)">&nbsp;</td>
58 		</tr>
59 		<tr>
60 			<td style="background: rgba(0, 50, 350, 0.4)">&nbsp;</td>
61 			<td style="background: rgb(153, 173, 255)">&nbsp;</td>
62 		</tr>
63 	</table>
64 
65 	</body>
66 </html>