blob: 2a849df25caaab1509bbb9521475e0f2b9a5363a [file] [log] [blame]
<!DOCTYPE html>
<html>
<title>CSS Grid Layout Test: 'float' and 'clear' have no effect on a grid item.</title>
<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-containers"/>
<link rel="issue" href="https://bugs.chromium.org/p/chromium/issues/detail?id=79180"/>
<link href="/css/support/grid.css" rel="stylesheet"/>
<link href="/css/support/alignment.css" rel="stylesheet"/>
<meta name="assert" content="This test ensures that the grid's items are not affected by the 'float' and 'clear' properties."/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<style>
.container {
background-color:grey;
}
.gridItem {
width: 50px;
height: 50px;
}
</style>
<body onload="checkLayout('.container')">
<div style="position: relative">
<div class="container grid justifyContentStart">
<div style="float: right;" class="gridItem firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="50"></div>
<div class="gridItem firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="50"></div>
<div style="float: left;" class="gridItem firstRowSecondColumn" data-offset-x="50" data-offset-y="0" data-expected-width="50" data-expected-height="50"></div>
<div style="float: left;" class="gridItem secondRowFirstColumn" data-offset-x="0" data-offset-y="50" data-expected-width="50" data-expected-height="50"></div>
<div style="clear: both;" class="gridItem secondRowFirstColumn" data-offset-x="0" data-offset-y="50" data-expected-width="50" data-expected-height="50"></div>
<div style="float: left;" class="gridItem secondRowSecondColumn" data-offset-x="50" data-offset-y="50" data-expected-width="50" data-expected-height="50"></div>
</div>
</div>
</body>
</html>