| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/x
html1/DTD/xhtml1-strict.dtd"> |
| 2 <html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 <head> |
| 4 <title>CSS Grid Layout Test: 'float' affects to the computed value of 'd
isplay' on grid items</title> |
| 5 <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igal
ia.com" /> |
| 6 <link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers"
title="3.1 Establishing Grid Containers" /> |
| 7 <link rel="help" href="http://www.w3.org/TR/CSS2/visuren.html#dis-pos-fl
o" title="9.7 Relationships between 'display', 'position', and 'float'" /> |
| 8 <meta name="flags" content="dom" /> |
| 9 <script src="/resources/testharness.js" type="text/javascript"></script> |
| 10 <script src="/resources/testharnessreport.js" type="text/javascript"></s
cript> |
| 11 <style type="text/css"><![CDATA[ |
| 12 #grid { |
| 13 display: grid; |
| 14 } |
| 15 |
| 16 #inline-grid { |
| 17 display: inline-grid; |
| 18 } |
| 19 |
| 20 .inline-table { |
| 21 display: inline-table; |
| 22 } |
| 23 |
| 24 .inline { |
| 25 display: inline; |
| 26 } |
| 27 |
| 28 .flex { |
| 29 display: flex; |
| 30 } |
| 31 |
| 32 .float { |
| 33 float: left; |
| 34 } |
| 35 ]]></style> |
| 36 </head> |
| 37 <body> |
| 38 <div id="log"></div> |
| 39 |
| 40 <div id="grid"> |
| 41 <div id="grid-inline-table" class="float inline-table"></div> |
| 42 <div id="grid-inline" class="float inline"></div> |
| 43 <div id="grid-flex" class="float flex"></div> |
| 44 </div> |
| 45 <div id="inline-grid"> |
| 46 <div id="inline-grid-inline-table" class="float inline-table"></div> |
| 47 <div id="inline-grid-inline" class="float inline"></div> |
| 48 <div id="inline-grid-flex" class="float flex"></div> |
| 49 </div> |
| 50 |
| 51 <script type="text/javascript"><![CDATA[ |
| 52 function testComputedStyleDisplay(element, value) { |
| 53 assert_equals(getComputedStyle(element).getPropertyValue("displa
y"), value, "getComputedStyle() display should be '" + value + "'"); |
| 54 } |
| 55 |
| 56 var gridInlineTable = document.getElementById("grid-inline-table"); |
| 57 test(function() { |
| 58 testComputedStyleDisplay(gridInlineTable, "table"); |
| 59 }, "Test display floated 'inline-table' grid item"); |
| 60 |
| 61 var gridInline = document.getElementById("grid-inline"); |
| 62 test(function() { |
| 63 testComputedStyleDisplay(gridInline, "block"); |
| 64 }, "Test display floated 'inline' grid item"); |
| 65 |
| 66 var gridFlex = document.getElementById("grid-flex"); |
| 67 test(function() { |
| 68 testComputedStyleDisplay(gridFlex, "flex"); |
| 69 }, "Test display floated 'flex' grid item"); |
| 70 |
| 71 var inlineGridInlineTable = document.getElementById("inline-grid-inl
ine-table"); |
| 72 test(function() { |
| 73 testComputedStyleDisplay(inlineGridInlineTable, "table"); |
| 74 }, "Test display floated 'inline-table' grid item within an inli
ne grid"); |
| 75 |
| 76 var inlineGridInline = document.getElementById("inline-grid-inline")
; |
| 77 test(function() { |
| 78 testComputedStyleDisplay(inlineGridInline, "block"); |
| 79 }, "Test display floated 'inline' grid item within an inline gri
d"); |
| 80 |
| 81 var inlineGridFlex = document.getElementById("inline-grid-flex"); |
| 82 test(function() { |
| 83 testComputedStyleDisplay(inlineGridFlex, "flex"); |
| 84 }, "Test display floated 'flex' grid item within an inline grid"
); |
| 85 ]]></script> |
| 86 </body> |
| 87 </html> |
| OLD | NEW |