grid-whitespace-handling-2.xhtml (1956B)
1 <?xml version="1.0" encoding="UTF-8"?> 2 <!-- 3 Any copyright is dedicated to the Public Domain. 4 http://creativecommons.org/publicdomain/zero/1.0/ 5 --> 6 <!-- 7 This test verifies that we preserve whitespace at the beginning & end of 8 anonymous grid items (using "white-space: pre" so that it actually 9 occupies space and affects the rendering). 10 --> 11 <html xmlns="http://www.w3.org/1999/xhtml"> 12 <head> 13 <title>CSS Test: Test that whitespace is preserved at the edges of anonymous grid items if 'white-space: pre' is set</title> 14 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/> 15 <link rel="help" href="http://www.w3.org/TR/css3-grid/#grid-items"/> 16 <link rel="match" href="grid-whitespace-handling-2-ref.xhtml"/> 17 <link rel="stylesheet" type="text/css" href="support/ahem.css" /> 18 <style> 19 div { height: 100px; } 20 div.grid { 21 white-space: pre; 22 border: 1px dashed blue; 23 width: 200px; 24 display: grid; 25 justify-content: space-around; 26 } 27 div.a { 28 width: 30px; 29 background: lightgreen; 30 } 31 div.b { 32 width: 20px; 33 background: lightblue; 34 } 35 </style> 36 </head> 37 <body> 38 <!-- spaces around inline content at the beginning of grid --> 39 <div class="grid"> abc<div class="a"/></div> 40 <div class="grid">abc <div class="a"/></div> 41 <div class="grid"> abc <div class="a"/></div> 42 43 <!-- spaces around inline content at the end of grid --> 44 <div class="grid"><div class="a"/> abc</div> 45 <div class="grid"><div class="a"/>abc </div> 46 <div class="grid"><div class="a"/> abc </div> 47 48 <!-- whitespace around inline content in between grid items --> 49 <div class="grid"><div class="a"/> abc<div class="b"/></div> 50 <div class="grid"><div class="a"/>abc <div class="b"/></div> 51 <div class="grid"><div class="a"/> abc <div class="b"/></div> 52 </body> 53 </html>