display-contents-first-line-002.html (689B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Display: display:contents and ::first-line inheritance</title> 4 <link rel="author" title="Rune Lillesveen" href="mailto:futhark@chromium.org"> 5 <link rel="help" href="https://drafts.csswg.org/css-display-3/#valdef-display-contents"> 6 <link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#first-line-pseudo"> 7 <link rel="match" href="display-contents-pass-green-no-red-ref.html"> 8 <style> 9 span { color: green } 10 .contents { display: contents } 11 #container::first-line { color: red } 12 </style> 13 <p>You should see the word PASS in green and no red below.</p> 14 <div id="container"> 15 <span class="contents">P</span><span>ASS</span> 16 </div>