grid-inline-first-letter-003.html (1073B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Grid Layout Test: '::first-letter' works on grid items within an inline grid</title> 4 <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> 5 <link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers"> 6 <link rel="help" href="http://www.w3.org/TR/css3-selectors/#first-letter" title="7.2. The ::first-letter pseudo-element"> 7 <link rel="match" href="../reference/grid-first-letter-green-margin-no-collapse-ref.html"> 8 <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."> 9 <style> 10 .inline-grid { 11 display: inline-grid; 12 } 13 14 .item::first-letter { 15 color: green; 16 } 17 </style> 18 <div class="inline-grid"> 19 <p class="item"> 20 The <strong>first letter</strong> of this paragraph, and only that one, should be <strong>green</strong>. 21 In addition, body and paragraph margins should <strong>not collapse</strong>. 22 </p> 23 </div>