grid-first-letter-001

'::first-letter' from grid container does not apply to grid items

WeasyPrint

Reference (good) by WeasyPrint

Reference (good) by this browser

This browser

Assertion
This test checks that '::first-letter' pseudo-element is ignored in grid items when applied to a grid container.

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' from grid container does not apply to grid items</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-text-green-margin-no-collapse-ref.htm">
 9         <meta name="assert" content="This test checks that '::first-letter' pseudo-element is ignored in grid items when applied to a grid container.">
10         <style type="text/css">
11             .grid {
12                 display: grid;
13                 color: green;
14             }
15 
16             .grid::first-letter {
17                 color: red;
18             }
19         </style>
20     </head>
21     <body>
22         <div class="grid">
23             <div>
24                 <p>This text should be <strong>green</strong> and body and paragraph margins should <strong>not collapse</strong>.</p>
25             </div>
26         </div>
27     </body>
28 </html>