before-after-002

Before, after is included in formatting changes

WeasyPrint

This browser

Assertion
Generated content is included in any formatting changes made to an element.

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: Before, after is included in formatting changes</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#before-after-content">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="Generated content is included in any formatting changes made to an element.">
 9         <style type="text/css">
10             div
11             {
12                 border: solid;
13                 color: green;
14             }
15             div:before
16             {
17                 content: 'PASS ';
18             }
19             div:after
20             {
21                 content: 'PASS';
22             }
23         </style>
24     </head>
25     <body>
26         <p>Test passes if the words "PASS PASS" appear in green inside the box.</p>
27         <div></div>
28     </body>
29 </html>