blocks-001

Parsing nested blocks and strings in style blocks

WeasyPrint

This browser

Flags
invalid
Assertion
Blocks and strings are parsed with matching terminating pairs.

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: Parsing nested blocks and strings in style blocks</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#block">
 7         <meta name="flags" content="invalid">
 8         <meta name="assert" content="Blocks and strings are parsed with matching terminating pairs.">
 9         <style type="text/css">
10             div
11             {
12                 \}
13                 "string}\" }" #div1{color:red}
14                 {}#div5{color: red}
15                 (
16                     }
17                     #div2{color: red}
18                 )
19                 [
20                     }
21                     #div3{color: red}
22                 ]
23                 [
24                     (
25                         ]
26                     )
27                     }
28                     #div4{color: red}
29                 ]
30             }
31         </style>
32     </head>
33     <body>
34         <p>Test passes if there is no red visible on the page.</p>
35         <div id="div1">Filler Text</div>
36         <div id="div2">Filler Text</div>
37         <div id="div3">Filler Text</div>
38         <div id="div4">Filler Text</div>
39         <div id="div5">Filler Text</div>
40     </body>
41 </html>