OLD | NEW |
(Empty) | |
| 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 don't create anonymous flex items around |
| 8 runs of inline content that are _purely_ whitespace. |
| 9 |
| 10 The test uses "white-space: pre", to try to tempt us into honoring |
| 11 that whitespace. (but we should resist that temptation). |
| 12 |
| 13 The test also uses 'justify-content: space-around' to be sure we can |
| 14 tell whether anonymous flex items are being created around the whitespace |
| 15 (since they'd claim a share of the packing space if they were there). |
| 16 --> |
| 17 <html xmlns="http://www.w3.org/1999/xhtml"> |
| 18 <head> |
| 19 <title>CSS Test: Test that anonymous flex items aren't created for pure-whit
espace inline content</title> |
| 20 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"
/> |
| 21 <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#flex-items"/> |
| 22 <link rel="match" href="flexbox-whitespace-handling-001-ref.xhtml"/> |
| 23 <style> |
| 24 div { height: 100px; } |
| 25 div.flexbox { |
| 26 white-space: pre; |
| 27 border: 1px dashed blue; |
| 28 width: 200px; |
| 29 display: flex; |
| 30 justify-content: space-around; |
| 31 } |
| 32 div.a { |
| 33 flex: none; |
| 34 width: 30px; |
| 35 background: lightgreen; |
| 36 } |
| 37 div.b { |
| 38 flex: none; |
| 39 width: 20px; |
| 40 background: lightblue; |
| 41 } |
| 42 img { width: 40px; } |
| 43 </style> |
| 44 </head> |
| 45 <body> |
| 46 <!-- whitespace & tab after flex item --> |
| 47 <div class="flexbox"><div class="a"/> </div> |
| 48 |
| 49 <!-- 2 spaces before flex item --> |
| 50 <div class="flexbox"> <div class="a"/><div class="b"/></div> |
| 51 |
| 52 <!-- newline & whitespace between flex items --> |
| 53 <div class="flexbox"><img src="solidblue.png"/> |
| 54 <img src="solidblue.png"/></div> |
| 55 </body> |
| 56 </html> |
| 57 |
OLD | NEW |