display-contents-text-inherit-002.html (661B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Display: Apply white-space property of display:contents element to inline children</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="match" href="display-contents-text-inherit-ref.html"> 7 <p>The words "Two" and "lines" should not be on the same line.</p> 8 <div id="div" style="background-color:red"> 9 <span style="display:contents;white-space:pre-line">Two 10 lines 11 </span> 12 </div> 13 <script> 14 document.body.offsetTop; 15 div.style.backgroundColor = "transparent"; 16 </script>