background-size-033

background-size - applies to ::first-line pseudo-element

WeasyPrint

This browser

Flags
image
Assertion
Check if background-size is able to apply to the ::first-line pseudo-element.

Source

 1 <!DOCTYPE html>
 2 <html><head>
 3     <meta charset="utf-8">
 4     <title>CSS Backgrounds and Borders Test: background-size - applies to ::first-line pseudo-element</title>
 5     <link href="http://www.intel.com" rel="author" title="Intel">
 6     <link href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" rel="reviewer" title="Gérard Talbot"> <!-- 2012-11-17 -->
 7     <link href="http://www.w3.org/TR/css3-background/#the-background-size" rel="help" title="3.9. Sizing Images: the 'background-size' property">
 8     <link href="http://www.w3.org/TR/css3-background/#values" rel="help">
 9     <meta content="image" name="flags">
10     <meta content="Check if background-size is able to apply to the ::first-line pseudo-element." name="assert">
11     <style>
12         div {color: white;}
13 
14         div::first-line {
15             background-image: url(support/blue96x96.png);
16             background-repeat: repeat no-repeat;
17             background-size: 100% 50%;
18             color: black;
19             font-size: 80px;
20         }
21     </style>
22   </head>
23   <body>
24     <p>Test passes if only the <strong>top half</strong> of "Text sample" has a <strong>blue background</strong>.</p>
25     <div>Text sample<br> text sample text sample</div>
26   
27 
28 </body></html>