grid-inline-first-letter-003

'::first-letter' works on grid items within an inline grid

WeasyPrint

Reference (good) by WeasyPrint

Reference (good) by this browser

This browser

Assertion
This test checks that '::first-letter' pseudo-element works as expected if it is applied directly to a grid item within an inline grid.

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 Grid Layout Test: '::first-letter' works on grid items within an inline grid</title>
 5         <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
 6         <link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
 7         <link rel="help" href="http://www.w3.org/TR/css3-selectors/#first-letter" title="7.2. The ::first-letter pseudo-element">
 8         <link rel="match" href="reference/grid-first-letter-green-margin-no-collapse-ref.htm">
 9         <meta name="assert" content="This test checks that '::first-letter' pseudo-element works as expected if it is applied directly to a grid item within an inline grid.">
10         <style type="text/css">
11             .inline-grid {
12                 display: inline-grid;
13             }
14 
15             .item::first-letter {
16                 color: green;
17             }
18         </style>
19     </head>
20     <body>
21         <div class="inline-grid">
22             <div class="item">
23                 <p>
24                     The <strong>first letter</strong> of this paragraph, and only that one, should be <strong>green</strong>.
25                     In addition, body and paragraph margins should <strong>not collapse</strong>.
26                 </p>
27             </div>
28         </div>
29     </body>
30 </html>