Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

  • This test has a WPT meta file that expects 1 subtest issues.
  • This WPT test may be referenced by the following Test IDs:
<!DOCTYPE html>
<html>
<title>CSS Grid Lanes Test: auto-fit columns and a single auto-placed subgrid</title>
<link rel="author" title="Alison Maher" href="mailto:almaher@microsoft.com">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
.grid-lanes {
display: grid-lanes;
flow-tolerance: 0;
grid-template-columns: repeat(auto-fit, 100px);
width: 400px;
height: 100px;
}
.subgrid {
display: grid;
grid-template-columns: subgrid;
}
.subgrid > div {
width: 100px;
height: 100px;
}
</style>
<div class="grid-lanes">
<div class="subgrid" style="grid-column: span 1;">
<div></div>
</div>
</div>
<script>
test(function() {
const container = document.querySelector('.grid-lanes');
const computedStyle = window.getComputedStyle(container);
assert_equals(computedStyle.getPropertyValue('grid-template-columns'),
"100px 0px 0px 0px");
});
</script>
</html>