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-lanes/tentative/intrinsic-sizing/grid-lanes-baseline-alignment-affects-intrinsic-size-002.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Grid Lanes Test: evaluate how the baseline affects the grid-lanes intrinsic size</title>
<link rel="author" title="Yanling Wang" href="mailto:yanlingwang@microsoft.com">
<link rel="help" href="https://drafts.csswg.org/css-grid-3/#track-sizing-performance">
<link rel="match" href="grid-lanes-baseline-alignment-affects-intrinsic-size-002-ref.html">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
<style>
.grid-lanes {
display: grid-lanes;
width: 200px;
margin-bottom: 20px;
align-items: baseline;
background: lightgray;
font-family: Ahem;
line-height: 1;
}
.font-tall-high-baseline {
font-size: 20px;
padding-top: 20px;
width: 50px;
background: lightblue;
}
.font-short-low-baseline {
font-size: 20px;
width: 50px;
background: lightgreen;
}
.font-with-top-padding {
font-size: 20px;
padding-top: 20px;
width: 50px;
background: coral;
align-self: last baseline;
}
.font-with-bottom-padding {
font-size: 20px;
padding-bottom: 30px;
width: 50px;
background: lightcyan;
}
.font-small-top-padded {
font-size: 20px;
padding-top: 60px;
width: 50px;
background: gold;
}
.font-medium-plain {
font-size: 30px;
width: 50px;
background: plum;
}
.font-with-margin-top {
font-size: 20px;
margin-top: 10px;
width: 50px;
background: lightsalmon;
}
.font-with-bottom-padding-no-margin {
font-size: 20px;
padding-bottom: 20px;
width: 50px;
background: lavender;
}
.font-with-margin-and-padding {
font-size: 20px;
margin-top: 20px;
padding-top: 10px;
width: 50px;
background: palegreen;
}
.font-with-small-margin-bottom-padding {
font-size: 20px;
margin-top: 10px;
padding-bottom: 20px;
width: 50px;
background: powderblue;
}
</style>
</head>
<body>
<div class="grid-lanes" style="grid-template-rows: minmax(0px, auto);">
<div class="font-tall-high-baseline">É</div>
<div class="font-short-low-baseline">É</div>
</div>
<div class="grid-lanes" style="grid-template-rows: minmax(0px, min-content);">
<div class="font-with-top-padding">É<br>É<br>É</div>
<div class="font-with-bottom-padding">É</div>
<div class="font-with-bottom-padding" style="align-self: last baseline;">É</div>
</div>
<div class="grid-lanes" style="grid-template-rows: minmax(0px, max-content);">
<div class="font-small-top-padded">É</div>
<div class="font-medium-plain">É</div>
</div>
<div class="grid-lanes" style="grid-template-rows: minmax(0px, auto);">
<div class="font-with-margin-top">É</div>
<div class="font-with-bottom-padding-no-margin">É</div>
</div>
<div class="grid-lanes" style="grid-template-rows: minmax(0px, auto);">
<div class="font-with-margin-and-padding">É</div>
<div class="font-with-small-margin-bottom-padding">É</div>
</div>
</body>
</html>