color-000

RGB color syntax error handling

WeasyPrint

This browser

Flags
invalid

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: RGB color syntax error handling</title>
 5   <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu">
 6   <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/006.html" type="text/html">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#color-units">
 8   <meta name="flags" content="invalid">
 9   <style type="text/css">
10     p.correct { color: red }
11     p.incorrect { color: green }
12     p#numnumpercent { color: rgb(255, 0, 0%) }
13     p#percentnumnum { color: rgb(100%, 0, 0) }
14     p#percentpercentnum { color: rgb(100%, 0%, 0) }
15     p#percentnumpercent { color: rgb(100%, 0, 0%) }
16     p#numpercentnum { color: rgb(255, 0%, 0); }
17     p#floatnumnum { color: rgb(255.0, 0, 0) }
18     p#numfloatnum { color: rgb(0, 128.0, 0) }
19     p#numnumnum { color: rgb(0, 128, 0) }
20     p#percentpercentpercent1 { color: rgb(0%, 50%, 0%) }
21     p#percentpercentpercent2 { color: rgb(0%, 49.99%, 0%) }
22   </style>
23  </head>
24  <body>
25   <p class="incorrect" id="numnumpercent">This should be green</p>
26   <p class="incorrect" id="percentnumnum">This should be green</p>
27   <p class="incorrect" id="percentpercentnum">This should be green</p>
28   <p class="incorrect" id="percentnumpercent">This should be green</p>
29   <p class="incorrect" id="numpercentnum">This should be green</p>
30   <p class="incorrect" id="floatnumnum">This should be green</p>
31   <p class="incorrect" id="numfloatnum">This should be green</p>
32   
33   <p class="correct" id="numnumnum">This should be green</p>
34   <p class="correct" id="percentpercentpercent1">This should be green</p>
35   <p class="correct" id="percentpercentpercent2">This should be green</p>
36  </body>
37 </html>