Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-grid/grid-items/grid-item-block-axis-content-contribution-003.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com">
<meta name="assert" content="A max-content row uses the grid item's max-content block-size contribution, measured against the item's own inline size.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
<link rel="match" href="grid-item-block-axis-content-contribution-001-ref.html">
<p>Test passes if there is a filled blue rectangle below and it is NOT taller than one line of text.</p>
<style>
.grid {
display: grid;
grid-template-columns: 10px;
grid-template-rows: max-content;
}
.item {
font: 10px/1 Ahem;
color: blue;
background: blue;
width: 150px;
word-break: break-all;
grid-row: 1 / 2;
}
</style>
<div class="grid">
<div class="item">XXXXXXXXXXXXXXX</div>
</div>
</html>